File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var React = require('react');
22
33module . exports = React . createClass ( {
44 render : function ( ) {
5- return < button className = { "btn " + this . props . className } type = "button" >
5+ return < button onClick = { this . props . whenClicked } className = { "btn " + this . props . className } type = "button" >
66 { this . props . title }
77 < span className = { this . props . subTitleClassName } > { this . props . subTitle } </ span >
88 </ button >
Original file line number Diff line number Diff line change @@ -7,10 +7,18 @@ var Button = require('./button');
77// var List = require('./list');
88
99module . exports = React . createClass ( {
10+ handleClick : function ( ) {
11+ alert ( 'hello from dropdown' ) ;
12+ } ,
1013 render : function ( ) {
1114
1215 return < div className = "dropdown" >
13- < Button className = "btn-default" title = { this . props . title } subTitleClassName = "caret" />
16+ < Button
17+ whenClicked = { this . handleClick }
18+ className = "btn-default"
19+ title = { this . props . title }
20+ subTitleClassName = "caret"
21+ />
1422 </ div >
1523 }
1624} ) ;
You can’t perform that action at this time.
0 commit comments