Provides drop-in support for Aphrodite in Gatsby.
yarn add aphrodite gatsby-plugin-aphrodite
or
npm install --save aphrodite gatsby-plugin-aphrodite
Add the plugin to the plugins array in your gatsby-config.js
:
//gatsby-config.js
plugins: ['gatsby-plugin-aphrodite']
then use aphrodite
in your component files:
// SomeComponent.js
import { StyleSheet, css } from 'aphrodite'
const styles = StyleSheet.create({ message: { color: 'red' } })
const SomeComponent = () => (
<div className={css(styles.message)}>Hello World</div>
)
export default SomeComponent
MIT © Ben Williams
Version | Tag | Published |
---|---|---|
2.1.1 | latest | 1yr ago |
1.1.0-alpha.d1544e1b | canary | 4yrs ago |
1.0.0-beta.6 | next | 5yrs ago |