Skip to content

Commit

Permalink
build: added react card to stories
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwaxhello committed May 23, 2024
1 parent 476d4b9 commit a24888b
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions packages/storybook/src/react-card.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof Card>;

export default meta;

// defines that this (part of the) story is documentation
type Story = StoryObj<typeof meta>;

// adds Frameless Card section to Card in Storybook
export const Default: Story = {
name: 'Frameless Card', // in sidenav shows Frameless Card below Docs
args: {},
parameters: {},
};

0 comments on commit a24888b

Please sign in to comment.