File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
var React = require ( 'react' ) ;
6
6
var Button = require ( './button' ) ;
7
- // var List = require('./list');
7
+ var ListItem = require ( './list-item ' ) ;
8
8
9
9
module . exports = React . createClass ( {
10
10
handleClick : function ( ) {
11
11
alert ( 'hello from dropdown' ) ;
12
12
} ,
13
13
render : function ( ) {
14
+ var list = this . props . items . map ( function ( item ) {
15
+ return < ListItem item = { item } />
16
+ } ) ;
14
17
15
18
return < div className = "dropdown" >
16
19
< Button
@@ -19,6 +22,9 @@ module.exports = React.createClass({
19
22
title = { this . props . title }
20
23
subTitleClassName = "caret"
21
24
/>
25
+ < ul >
26
+ { list }
27
+ </ ul >
22
28
</ div >
23
29
}
24
30
} ) ;
Original file line number Diff line number Diff line change
1
+ var React = require ( 'react' ) ;
2
+
3
+ module . exports = React . createClass ( {
4
+ render : function ( ) {
5
+ return < li > < a > { this . props . item } </ a > </ li >
6
+ }
7
+ } ) ;
You can’t perform that action at this time.
0 commit comments