Last active
September 13, 2016 03:50
-
-
Save andrewdelprete/09a409d305dcb6a710fef85599593c0f to your computer and use it in GitHub Desktop.
NeckbeardJS - Pass an Object
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
// https://www.neckbeardjs.com/usage | |
import Neckbeard from 'neckbeard'; | |
const nb = Neckbeard.create(); | |
// Pass your own custom styles object to be injected | |
// into the DOM dynamically using Aphrodite. | |
// You can use Neckbeard styles to compose! | |
const styles = { | |
"text": { | |
...nb.fwbold, // fontWeight: bold | |
...nb.ft5, // fontSize: 1.4rem | |
"color": "red" // Your custom properties | |
} | |
}; | |
<MyComponent className={ nb(styles) } /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment