import {
  Story,
  Preview,
  Props,
  ArgsTable,
  Canvas,
  Description,
} from '@storybook/addon-docs/blocks';
import { CssGrid } from './CssGrid';

# CssGrid

`CssGrid` is a representation of Css Grid layout system.
This component consist of two components - `Container` and `Item` components.

`CssGrid` is built for and recommended to use only in complex cases. In other cases we recommend to use Flexbox.

For example, here you can see a complex case where the `CssGrid` component is perfectly fits.

<Preview>
  <Story id="layout-cssgrid--basic" />
</Preview>

## Responsive props

`CssGrid.Container` and `CssGrid.Item` includes responsive props `sm`, `md`, `lg` and `xl`. They can be used to override any styling props of the `CssGrid` depending on screen size.
This is a pure css solution so html attribute props are not included. You can read more about responsive props in the Responsive props section of the [Box documentation](?path=/docs/layout-box--default-props#responsive-props).

## CssGrid.Container

You can think of `Container` component as an `div` element with `display: grid;` style rules.

<ArgsTable of={CssGrid.Container} />

## CssGrid.Item

`Item` component is an child element of grid template.

<ArgsTable of={CssGrid.Item} />
