Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Last active November 29, 2020 09:39
Show Gist options
  • Save PaulieScanlon/28aa8ed65bc530d769f7a306bd63d2b0 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/28aa8ed65bc530d769f7a306bd63d2b0 to your computer and use it in GitHub Desktop.
1. `yarn add gatsby-plugin-theme-ui theme-ui`
2. add `gatsby-plugin-theme-ui` to gatsby plugins array in `gatsby-config`
`module.exports = {
plugins: [
'gatsby-plugin-theme-ui'`
]
}
`
3. create a dir with an index.js in `src/gatsby-plugin-theme-ui/index.js`
4. copy the basic colors object... there's more details in the docs
`export default {
colors: {
text: '#333333',
background: '#ffffff',
primary: '#FF5BA3',
}
}`
5. in your index import a button: import {Button} from 'theme-ui
6. use yhe button somewhere` <Button>Boogy Time</Button>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment