Last active
November 29, 2020 09:39
-
-
Save PaulieScanlon/28aa8ed65bc530d769f7a306bd63d2b0 to your computer and use it in GitHub Desktop.
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
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