// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import Flex from '../Flex'; import Grid from './'; import Cell from './Cell'; export default { title: 'UI Components/Grid', component: Grid, excludeStories: ['Child'], parameters: { layout: 'fullscreen', }, }; export const Child: React.FC> = ({ children, }) => ( {children} ); export const BasicGrid = (args) => { const children = new Array(args.size) .fill(0) .map((x, i) => Child); return (
{children}
); }; BasicGrid.argTypes = { size: { control: 'number' }, responsive: { control: 'boolean' }, gridGap: { control: 'text' }, gridAutoFlow: { control: 'text' }, gridTemplateRows: { control: 'text' }, gridTemplateColumns: { control: 'text' }, }; BasicGrid.args = { size: 4, responsive: true, gridGap: '.5rem', gridAutoFlow: '', gridTemplateRows: '', gridTemplateColumns: 'repeat(2, 1fr) 4fr', }; BasicGrid.story = 'Basic Grid'; export const NamedGrid = () => { return (
Other Other Main SideBar
); }; NamedGrid.story = { name: 'Named Areas Grid', };