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');
2
2
3
3
module . exports = React . createClass ( {
4
4
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" >
6
6
{ this . props . title }
7
7
< span className = { this . props . subTitleClassName } > { this . props . subTitle } </ span >
8
8
</ button >
Original file line number Diff line number Diff line change @@ -7,10 +7,18 @@ var Button = require('./button');
7
7
// var List = require('./list');
8
8
9
9
module . exports = React . createClass ( {
10
+ handleClick : function ( ) {
11
+ alert ( 'hello from dropdown' ) ;
12
+ } ,
10
13
render : function ( ) {
11
14
12
15
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
+ />
14
22
</ div >
15
23
}
16
24
} ) ;
You can’t perform that action at this time.
0 commit comments