Skip to content

Instantly share code, notes, and snippets.

@andrewdelprete
Last active September 13, 2016 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewdelprete/09a409d305dcb6a710fef85599593c0f to your computer and use it in GitHub Desktop.
Save andrewdelprete/09a409d305dcb6a710fef85599593c0f to your computer and use it in GitHub Desktop.
NeckbeardJS - Pass an Object
// 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