From a24888b58a84048901c040fe2e4d8d79f4fc3dc1 Mon Sep 17 00:00:00 2001 From: Marwaxhello <112861555+Marwaxhello@users.noreply.github.com> Date: Thu, 23 May 2024 15:37:09 +0200 Subject: [PATCH] build: added react card to stories --- packages/storybook/src/react-card.stories.tsx | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 packages/storybook/src/react-card.stories.tsx diff --git a/packages/storybook/src/react-card.stories.tsx b/packages/storybook/src/react-card.stories.tsx new file mode 100644 index 00000000..48454c87 --- /dev/null +++ b/packages/storybook/src/react-card.stories.tsx @@ -0,0 +1,53 @@ +import readme from '@frameless/components-css/card/README.md?raw'; +import { Card } from '@frameless/components-react/src/Card'; +import type { Meta, StoryObj } from '@storybook/react'; + +import '@frameless/components-css/card/index.scss'; + +// adds Card to Storybook +const meta = { + title: 'React Component/Card', + + id: 'react-card', + + component: Card, + + argTypes: { + children: { + name: 'Content', + + description: 'Card', + + type: { + name: 'string', + required: true, + }, + + defaultValue: '', + }, + }, + + args: {}, + + tags: ['autodocs'], + + parameters: { + docs: { + description: { + component: readme, + }, + }, + }, +} satisfies Meta; + +export default meta; + +// defines that this (part of the) story is documentation +type Story = StoryObj; + +// adds Frameless Card section to Card in Storybook +export const Default: Story = { + name: 'Frameless Card', // in sidenav shows Frameless Card below Docs + args: {}, + parameters: {}, +};