Created
December 6, 2016 18:48
-
-
Save casesandberg/98ce0d5c4029c99a3499a7b93cb87317 to your computer and use it in GitHub Desktop.
reactcss playground
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
import React from 'react' | |
import reactCSS from 'reactcss' | |
const ListItem = ({ label, first, last, hover }) => { | |
const styles = reactCSS({ | |
'default': { | |
item: { | |
marginTop: 1, | |
padding: 15, | |
background: '#333', | |
}, | |
label: { | |
size: 'small', | |
}, | |
}, | |
'first': { | |
item: { | |
marginTop: 0, | |
borerRadius: '2px 2px 0 0', | |
}, | |
}, | |
'last': { | |
item: { | |
borerRadus: '0 0 2px 2px', | |
}, | |
}, | |
'hover': { | |
item: { | |
background: '#444', | |
}, | |
label: { | |
weight: 'bold', | |
}, | |
}, | |
}, { first, last, hover }) | |
return ( | |
<div style={ styles.item }> | |
<Text style={ styles.label }> | |
{ label } | |
</Text> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment