diff --git a/src/components/LastUpdatedCell/LastUpdatedCell.stories.mdx b/src/components/LastUpdatedCell/LastUpdatedCell.stories.mdx index 7bcb260..08ab04a 100644 --- a/src/components/LastUpdatedCell/LastUpdatedCell.stories.mdx +++ b/src/components/LastUpdatedCell/LastUpdatedCell.stories.mdx @@ -1,35 +1,70 @@ -import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks'; import LastUpdatedCell from "./LastUpdatedCell"; - + -# Today +Accepts a time and renders an [ItemTableCell](/?path=/docs/components-itemtablecell) with darker shades of red to show older items. - - - {args => } - - - -# Last Week +Time scales are: + - 1-6 days old + - 7-28 days old + - 29+ days old - - {args => } + + { args => } + + { + let today = new Date(); + let lastWeek = new Date().setDate(today.getDate() - 8); + return lastWeek; + })(), + }} + > + { args => } + + { + let today = new Date(); + let lastWeek = new Date().setDate(today.getDate() - 29); + return lastWeek; + })(), + }} + > + { args => } -# Last Mounth +## Forwarded ItemTableCell Props +Props can be passed to the [ItemTableCell](/?path=/docs/components-itemtablecell) component using the ItemTableCellProps prop. - - {args => } + + { args => } + \ No newline at end of file