Skip to content

Commit

Permalink
feat(FlexGrid): stories (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
ACoolmanTelicent authored Jan 30, 2025
1 parent 64e392e commit 7bba9ab
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions src/v1/components/layout/FlexGrid.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// FlexGrid.stories.tsx
import React from 'react';
import type { Meta, StoryFn } from '@storybook/react';
import { Text } from '../data-display/Text/Text';
import { Button } from '@mui/material'; // Assuming Button is also exported from MUI
import { FlexGrid, FlexGridItem } from './FlexGrid';

export default {
title: 'Layout/FlexGrid',
component: FlexGrid,
subcomponents: { FlexGridItem },
parameters: {
layout: 'fullscreen',
},
} as Meta;

const Template: StoryFn = (args) => <FlexGrid {...args} />;

export const BasicColumns = Template.bind({});
BasicColumns.args = {
children: (
<>
<FlexGridItem xs={6} style={{ backgroundColor: '#f77', padding: 20 }}>
<Text >Left Column</Text>
<Button variant="contained" color="primary">Action 1</Button>
<Text>More text underneath the button to show stacking.</Text>
</FlexGridItem>
<FlexGridItem xs={6} style={{ backgroundColor: '#77f', padding: 20 }}>
<Text >Right Column</Text>
<Button variant="outlined" color="secondary">Action 2</Button>
<Text>Additional description for context.</Text>
</FlexGridItem>
</>
),
};

export const Rows = Template.bind({});
Rows.args = {
direction: "column",
children: (
<>
<FlexGridItem xs={12} style={{ backgroundColor: '#7f7', padding: 20 }}>
<Text >Top Row</Text>
<Text>This row can include more detailed elements like forms or charts.</Text>
</FlexGridItem>
<FlexGridItem xs={12} style={{ backgroundColor: '#f77', padding: 20 }}>
<Text >Bottom Row</Text>
<Text>Even more content here, such as a slider or a progress bar.</Text>
</FlexGridItem>
</>
),
};

export const MainDetailLayout = Template.bind({});
MainDetailLayout.args = {
children: (
<>
<FlexGridItem xs={8} style={{ backgroundColor: '#77f', padding: 20 }}>
<Text >Main Content</Text>
<Text>Description of the main content area, potentially including large data visualizations.</Text>
</FlexGridItem>
<FlexGridItem xs={4} style={{ backgroundColor: '#7f7', padding: 20 }}>
<Text >Sidebar</Text>
<Text>Links or additional controls related to the main content could go here.</Text>
</FlexGridItem>
</>
),
};

0 comments on commit 7bba9ab

Please # to comment.