Skip to content

Commit

Permalink
Merge pull request react-bootstrap#915 from AlexKVal/panelOnclick
Browse files Browse the repository at this point in the history
Document possibility to pass on any additional properties to Panel
  • Loading branch information
mtscout6 committed Jul 6, 2015
2 parents 7f3ec2d + 4471026 commit cfbe561
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/examples/PanelBasic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
function handleClick() {
alert('You have clicked on me');
}

const panelInstance = (
<Panel>
<Panel onClick={ handleClick }>
Basic panel example
</Panel>
);
Expand Down
1 change: 1 addition & 0 deletions docs/src/ComponentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ const ComponentsPage = React.createClass({

<h3 id='panels-basic'>Basic example</h3>
<p>By default, all the <code>&lt;Panel /&gt;</code> does is apply some basic border and padding to contain some content.</p>
<p>You can pass on any additional properties you need, e.g. a custom <code>onClick</code> handler, as it is shown in the example code. They all will apply to the wrapper <code>div</code> element.</p>
<ReactPlayground codeText={Samples.PanelBasic} />

<h3 id='panels-heading'>Panel with heading</h3>
Expand Down

0 comments on commit cfbe561

Please sign in to comment.