@real-system/box-primitive

A basic div with style props that should be used to build other components

Usage no npm install needed!

<script type="module">
  import realSystemBoxPrimitive from 'https://cdn.skypack.dev/@real-system/box-primitive';
</script>

README

@real-system/box-primitive

Real System's primitive Box component.

npm version

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>
  );
};