aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-14 12:39:09 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-14 12:50:32 +0100
commit50f1c501a87ef5f5650750dbeca797e833ec7c3a (patch)
treef1f55092696c7261eaa7f9f9a9338253ede65c2b /src/components/organisms/widgets/sharing-widget/sharing-widget.stories.tsx
parentfb29b0f017fae162ffa7ad6bdfc80099346802de (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.tsx50
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'],
+};