From 5b03c4347877a3bf5c5a48e496f61ca152c9b6d1 Mon Sep 17 00:00:00 2001 From: Ola Rubaj <52197250+olayway@users.noreply.github.com> Date: Tue, 8 Aug 2023 19:16:27 +0200 Subject: [PATCH] [core][xs]: add example story --- packages/core/src/ui/Card/Card.stories.tsx | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 packages/core/src/ui/Card/Card.stories.tsx diff --git a/packages/core/src/ui/Card/Card.stories.tsx b/packages/core/src/ui/Card/Card.stories.tsx new file mode 100644 index 00000000..93a68c10 --- /dev/null +++ b/packages/core/src/ui/Card/Card.stories.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; + +import { Card } from './Card'; + +const meta: Meta = { + component: Card, +}; + +export default meta; +type Story = StoryObj; + +/* + *👇 Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/react/api/csf + * to learn how to use render functions. + */ + +const blog = { + urlPath: "#", + title: "Card title goes here", + date: "2021-01-01", + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam quis accumsan maximus, quam libero porttitor nisl, vita", +} + +export const Primary: Story = { + render: () => ( + + + {blog.title} + + + {blog.date} + + {blog.description && ( + + {blog.description} + + )} + Read article + + ), +};