2.0.0 • Published 7 years ago
layout-primitives v2.0.0
Layout Primitives built using Emotion and React
Implementation:
yarn add layout-primitives emotion theme-provider
- Add emotion to
.babelrc
- Add the
ThemeProvider
at the top level of your app, with the theme function fromutils
- Make awesome things
Usage:
import { ThemeProvider, withTheme } from 'theme-provider';
import { Container, makeTheme } from 'layout-primitives';
const Wrapper = withTheme(Container);
const App = () => (
<ThemeProvider theme={...makeTheme()}>
<Wrapper>
<h1>Hello World</h1>
</Wrapper>
</ThemeProvider>
);