-
-
Notifications
You must be signed in to change notification settings - Fork 1
Customize Theme UI
Arpit Sheth edited this page Jul 30, 2020
·
1 revision
If you want to customize the colors, fonts, or other theme styles, you will need to shadow Theme UI.
- Create a directory to shadow the theme object if it doesn't exist yet
/src/gatsby-plugin-theme-ui
- Create a file for
index.ts
- I recommend importing the
themePolaroid
theme object andThemePolaroid
type definition from@shetharp/gatsby-theme-polaroid
, as well asmerged
fromtheme-ui
to help merge your custom styles with the original.
import { merge } from "theme-ui";
import { themePolaroid, ThemePolaroid } from "@shetharp/gatsby-theme-polaroid";
/**
* The theme overrides for this site.
*/
export const themeSite = merge(themePolaroid, {
colors: {
primary: themePolaroid.colors.mango.base,
},
fontWeights: {
body: 300,
bold: 500,
heading: 500,
},
});
export default themeSite;