diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-06-07 16:02:21 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-06-07 17:13:40 +0200 |
| commit | 73f94705dc583e968114e5a09e85979448f3412b (patch) | |
| tree | 45b7dd12f1af6a44caabab31a28c98f8749d08ff /src/components/molecules/layout/card.stories.tsx | |
| parent | d54fc38899b3ffc87104ed03f5e48be3f02e337c (diff) | |
chore(cards): use post title as link label
Diffstat (limited to 'src/components/molecules/layout/card.stories.tsx')
| -rw-r--r-- | src/components/molecules/layout/card.stories.tsx | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/src/components/molecules/layout/card.stories.tsx b/src/components/molecules/layout/card.stories.tsx index 0ad42c0..87051a9 100644 --- a/src/components/molecules/layout/card.stories.tsx +++ b/src/components/molecules/layout/card.stories.tsx @@ -1,5 +1,6 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; import Card from './card'; +import { cover, id, meta, tagline, title, url } from './card.fixture'; /** * Card - Storybook Meta @@ -47,6 +48,16 @@ export default { required: false, }, }, + id: { + control: { + type: 'text', + }, + description: 'The card id.', + type: { + name: 'string', + required: true, + }, + }, meta: { description: 'The card metadata (a publication date for example).', table: { @@ -108,25 +119,15 @@ export default { const Template: ComponentStory<typeof Card> = (args) => <Card {...args} />; -const cover = { - alt: 'A picture', - height: 480, - src: 'http://placeimg.com/640/480', - width: 640, -}; - -const meta = { - thematics: ['Autem', 'Eos'], -}; - /** * Card Stories - Default */ export const Default = Template.bind({}); Default.args = { - title: 'Veritatis dicta quod', + id, + title, titleLevel: 2, - url: '#', + url, }; /** @@ -135,9 +136,10 @@ Default.args = { export const WithCover = Template.bind({}); WithCover.args = { cover, - title: 'Veritatis dicta quod', + id, + title, titleLevel: 2, - url: '#', + url, }; /** @@ -145,10 +147,11 @@ WithCover.args = { */ export const WithMeta = Template.bind({}); WithMeta.args = { + id, meta, - title: 'Veritatis dicta quod', + title, titleLevel: 2, - url: '#', + url, }; /** @@ -156,10 +159,11 @@ WithMeta.args = { */ export const WithTagline = Template.bind({}); WithTagline.args = { - tagline: 'Ullam accusantium ipsa', - title: 'Veritatis dicta quod', + id, + tagline, + title, titleLevel: 2, - url: '#', + url, }; /** @@ -168,9 +172,10 @@ WithTagline.args = { export const WithAll = Template.bind({}); WithAll.args = { cover, + id, meta, - tagline: 'Ullam accusantium ipsa', - title: 'Veritatis dicta quod', + tagline, + title, titleLevel: 2, - url: '#', + url, }; |
