README
@real-system/box-primitive
Real System's primitive Box component.
Usage
Installation
# install peer dependencies
# npm
$ npm install --save @real-system/styling-library react react-dom
# yarn
$ yarn add @real-system/styling-library react react-dom
# install box
# npm
$ npm install --save @real-system/box-primitive
# yarn
$ yarn add @real-system/box-primitive
Code Example
import { ThemeProvider } from '@real-system/theme-library';
import { Box, BoxAs } from '@real-system/box-primitive';
const Aside = BoxAs('aside');
const MyComponent = () => {
return (
<ThemeProvider>
<Aside background="color-background" display="flex" flexDirection="column">
<Box display="flex">...</Box>
</Aside>
</ThemeProvider>
);
};