From 606a5e5317385ac5edc7a533fec2c7b98ab4237c Mon Sep 17 00:00:00 2001 From: akhilmhdh Date: Sat, 21 Jan 2023 20:49:46 +0530 Subject: [PATCH] feat(ui): added card component --- .../src/components/v2/Card/Card.stories.tsx | 40 ++++++++++++ frontend/src/components/v2/Card/Card.tsx | 62 +++++++++++++++++++ frontend/src/components/v2/Card/index.tsx | 2 + frontend/src/components/v2/index.tsx | 1 + 4 files changed, 105 insertions(+) create mode 100644 frontend/src/components/v2/Card/Card.stories.tsx create mode 100644 frontend/src/components/v2/Card/Card.tsx create mode 100644 frontend/src/components/v2/Card/index.tsx diff --git a/frontend/src/components/v2/Card/Card.stories.tsx b/frontend/src/components/v2/Card/Card.stories.tsx new file mode 100644 index 0000000000..e21625cb42 --- /dev/null +++ b/frontend/src/components/v2/Card/Card.stories.tsx @@ -0,0 +1,40 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { Card, CardBody, CardFooter, CardProps, CardTitle } from './Card'; + +const meta: Meta = { + title: 'Components/Card', + component: Card, + tags: ['v2'], + argTypes: { + isRounded: { + type: 'boolean', + defaultValue: true + } + } +}; + +export default meta; +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args +const Template = (args: CardProps) => ( +
+ + Title + Content + Footer + +
+); + +export const Basic: Story = { + render: (args) =>