@komfy-social/rebass-preset-material
v4.0.7-komfy
Published
Material Design theme preset for use with Rebass
Downloads
2
Maintainers
Readme
@rebass/preset-material
Material Design theme preset for use with Rebass
npm i @rebass/preset-material
Usage
For general usage with Emotion, pass the theme preset to Emotion's ThemeProvider
component at the root of your application.
import React from 'react'
import { ThemeProvider } from 'emotion-theming'
import theme from '@rebass/preset-material'
export default props =>
<ThemeProvider theme={theme}>
{props.children}
</ThemeProvider>
For use with Theme UI, import the ThemeProvider
from theme-ui
.
import { ThemeProvider } from 'theme-ui'
Or, if you're using gatsby-plugin-theme-ui
, export the theme from src/gatsby-plugin-theme-ui/index.js
.
// src/gatsby-plugin-theme-ui/index.js
import preset from '@rebass/preset-material'
export default {
...preset
}