Skip to content

Commit

Permalink
Update ItemTableCell stories
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 15, 2021
1 parent 6c57669 commit c48813e
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions src/components/ItemTableCell/ItemTableCell.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
import ItemTableCell from "./ItemTableCell";
import { Paper } from '@material-ui/core';

The ItemTableCell wraps an [MUI TableCell](https://material-ui.com/api/table-cell/) and adds styling.



<Meta title="Components/ItemTableCell"
decorators={[ (Story) => (
<Paper>
<Story />
</Paper>
),]}
component={ItemTableCell}/>

## Default Usage
<Meta
title="Components/ItemTableCell"
component={ItemTableCell}
/>

## Default
<Canvas>
<Story name="Default" args={{
children:"Hello, moto!",
}}>
{args => <ItemTableCell {...args} />}
<Story
name="Default"
args={{
children: "Hello, moto!",
}}
>
{ args => <ItemTableCell {...args} /> }
</Story>
</Canvas>


## Forwarded TableCell Props
Props can be passed to the TableCell component using the TableCellProps prop.
Props can be passed to the [MUI TableCell](https://material-ui.com/api/table-cell/) component using the TableCellProps prop.

<Canvas>
<Story name="With Forwarded props" args={{
children:"Hello, moto!",
TableCellProps:{ component: Paper, variant: "footer" }
}}>
{args => <ItemTableCell {...args} />}
<Story
name="With Forwarded props"
args={{
children: <a href="https://www.youtube.com/watch?v=GGjxZY5Ka0g">I am small!</a>,
TableCellProps: {
size: "small"
}
}}
>
{ args => <ItemTableCell {...args} /> }
</Story>
</Canvas>

<ArgsTable of={ItemTableCell} />

0 comments on commit c48813e

Please sign in to comment.