Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5adb53
commit a866b7a
Showing
6 changed files
with
79 additions
and
80 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@import "../variables"; | ||
|
||
$list-color: unquote("rgb(#{$color-black})") !default; | ||
$list-background: unquote("rgb(#{$color-white})") !default; | ||
|
||
.root { | ||
list-style: none; | ||
|
||
&, a { | ||
color: $list-color; | ||
} | ||
|
||
> li { | ||
overflow: hidden; | ||
background-color: $list-background; | ||
box-shadow: $zdepth-shadow-1; | ||
transition-timing-function: $animation-curve-default; | ||
transition-duration: $animation-duration; | ||
transition-property: box-shadow; | ||
|
||
&:hover { | ||
box-shadow: $zdepth-shadow-2; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import List from '../../components/list'; | ||
|
||
export default React.createClass({ | ||
displayName: 'ListTest', | ||
|
||
getInitialState () { | ||
return { | ||
countries: [ | ||
{ value: 'ES-es', label: 'Spain', img: 'http://' }, | ||
{ value: 'TH-th', label: 'Thailand', img: 'http://' }, | ||
{ value: 'EN-gb', label: 'England', img: 'http://' }, | ||
{ value: 'EN-en', label: 'USA', img: 'http://' }, | ||
{ value: 'FR-fr', label: 'France', img: 'http://' } | ||
], | ||
selected: 'TH-th' | ||
}; | ||
}, | ||
|
||
onChange (dropdown) { | ||
console.log('[DROPDOWN]', dropdown.getValue()); | ||
}, | ||
|
||
customDropdownItem (data) { | ||
const style = { | ||
width: 32, | ||
height: 32, | ||
backgroundColor: '#ccc', | ||
marginRight: 8 | ||
}; | ||
|
||
return ( | ||
<div data-flex="horizontal grow" data-flex-content="center"> | ||
<img src={data.img} data-flex-grow="min" style={style} /> | ||
<div data-flex-grow="max" data-flex="vertical" > | ||
<strong>{data.label}</strong> | ||
<small>{data.value}</small> | ||
</div> | ||
</div> | ||
); | ||
}, | ||
|
||
render () { | ||
return ( | ||
<section> | ||
<h5>List</h5> | ||
<p>lorem ipsum...</p> | ||
<List dataSource={this.state.countries} value={this.state.selected} template={this.customDropdownItem} onChange={this.onChange}/> | ||
</section> | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters