Skip to content

Instantly share code, notes, and snippets.

@casesandberg
Created December 6, 2016 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save casesandberg/98ce0d5c4029c99a3499a7b93cb87317 to your computer and use it in GitHub Desktop.
Save casesandberg/98ce0d5c4029c99a3499a7b93cb87317 to your computer and use it in GitHub Desktop.
reactcss playground
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