diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-14 12:39:09 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-14 12:50:32 +0100 |
| commit | 50f1c501a87ef5f5650750dbeca797e833ec7c3a (patch) | |
| tree | f1f55092696c7261eaa7f9f9a9338253ede65c2b /src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx | |
| parent | fb29b0f017fae162ffa7ad6bdfc80099346802de (diff) | |
refactor(components): replace Sharing with SharingWidget component
* all the widgets should have a coherent name
* fix mailto uri
* remove useless CSS
* add tests
Diffstat (limited to 'src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx')
| -rw-r--r-- | src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx b/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx new file mode 100644 index 0000000..3e3cb68 --- /dev/null +++ b/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx @@ -0,0 +1,50 @@ +import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import { Heading } from '../../../atoms'; +import { SharingWidget } from './sharing-widget'; + +/** + * SharingWidget - Storybook Meta + */ +export default { + title: 'Organisms/Widgets/Sharing', + component: SharingWidget, + argTypes: { + data: { + description: 'The page data.', + type: { + name: 'object', + required: true, + value: {}, + }, + }, + media: { + control: { + type: null, + }, + description: 'An array of active and ordered sharing medium.', + type: { + name: 'string', + required: true, + }, + }, + }, +} as ComponentMeta<typeof SharingWidget>; + +const Template: ComponentStory<typeof SharingWidget> = (args) => ( + <SharingWidget {...args} /> +); + +/** + * SharingWidget Stories - Sharing + */ +export const Sharing = Template.bind({}); +Sharing.args = { + data: { + excerpt: + 'Alias similique eius ducimus laudantium aspernatur. Est rem ut eum temporibus sit reprehenderit aut non molestias. Vel dolorem expedita labore quo inventore aliquid nihil nam. Possimus nobis enim quas corporis eos.', + title: 'Accusantium totam nostrum', + url: 'https://www.example.test', + }, + heading: <Heading level={3}>Share</Heading>, + media: ['diaspora', 'facebook', 'linkedin', 'twitter', 'email'], +}; |
