Last active
November 20, 2017 05:06
-
-
Save loklaan/ddc03300d9990611a9b641e52fb36414 to your computer and use it in GitHub Desktop.
Essentials to element-styles: the styles function.
This file contains hidden or 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 { styled } from 'element-styles' | |
@styled() | |
class Button extends Component { | |
render () { | |
const { styles, children, ...props } = this.props; | |
return ( | |
<button {...props} {...styles('container')}> | |
<span {...styles('inner')}>{children}</span> | |
</button> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment