// // Copyright 2026 DXOS.org // import { type Meta, type StoryObj } from '@storybook/react-vite'; import React from 'react'; import { type ChromaticPalette } from '@dxos/ui-types'; import { withLayout, withTheme } from '../../testing/index.ts'; import { Grid } from './Grid.tsx'; const Cell = ({ label, hue }: { label: string; hue: ChromaticPalette }) => (
{label}
); const ColsStory = () => ( ); const RowsStory = () => ( ); const MixedStory = () => ( ); const TracksStory = () => ( ); const SubgridStory = () => ( {['A', 'B', 'C'].map((label) => ( // The row adopts the outer tracks, so every row's columns line up. ))} ); const meta: Meta = { title: 'ui/react-ui-core/layout/Grid', decorators: [withTheme(), withLayout({ layout: 'column' })], parameters: { layout: 'fullscreen' }, }; export default meta; type Story = StoryObj; export const Cols: Story = { render: ColsStory }; export const Rows: Story = { render: RowsStory }; export const Mixed: Story = { render: MixedStory }; export const Tracks: Story = { render: TracksStory }; export const Subgrid: Story = { render: SubgridStory };