File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1- require ' ./style'
1+ localCSS = require ' ./style'
22
33module .exports = React .createClass
44
@@ -11,17 +11,21 @@ module.exports = React.createClass
1111 type : React .PropTypes .string
1212
1313 getDefaultProps : ->
14- attributes : " "
14+ attributes : ' '
15+ className : ' '
1516 dataSource : []
16- type : " default"
17+ type : ' default'
1718
1819 # -- Events
1920 onClick : (event , item ) ->
2021 @props .onClick ? event, item
2122
2223 # -- Render
2324 render : ->
24- <ul data-component-list = {@props .type }>
25+ className = " #{ localCSS .root } #{ @props .className } "
26+ className += " #{ @props .type } " if @props .type
27+
28+ <ul data-react-toolbox = ' list' className = {className}>
2529 {
2630 for item, index in @props .dataSource
2731 <li key = {index} onClick = {@onClick .bind null , item}>
Original file line number Diff line number Diff line change 1- @import " ../constants.styl"
1+ @import ' ../constants'
22
3- [ data-component-list ]
3+ : local( .root )
44 list-style : none
55 & , a
66 color : TEXT
77 > li
88 overflow : hidden
99 background-color : WHITE
1010 box-shadow : ZDEPTH_SHADOW_1
11- transition-property box-shadow
12- transition-duration ANIMATION_DURATION
13- transition-timing-function ANIMATION_EASE
14- // -- Classes
11+ transition-property : box-shadow
12+ transition-duration : ANIMATION_DURATION
13+ transition-timing-function : ANIMATION_EASE
1514 & :hover
1615 box-shadow : ZDEPTH_SHADOW_2
You can’t perform that action at this time.
0 commit comments