🌁 Added a story for Card
This commit is contained in:
27
src/client/stories/Vertical.stories.tsx
Normal file
27
src/client/stories/Vertical.stories.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
// Button.stories.ts|tsx
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
||||
|
||||
import { Card } from '../components/Carda';
|
||||
import "../assets/scss/App.scss";
|
||||
export default {
|
||||
/* 👇 The title prop is optional.
|
||||
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
||||
* to learn how to generate automatic titles
|
||||
*/
|
||||
title: 'Card',
|
||||
component: Card,
|
||||
} as ComponentMeta<typeof Card>;
|
||||
|
||||
//👇 We create a “template” of how args map to rendering
|
||||
const Template = (args) => <Card {...args} />;
|
||||
//👇 Each story then reuses that template
|
||||
export const Vertical = Template.bind({});
|
||||
Vertical.args = {
|
||||
orientation: 'vertical',
|
||||
hasDetails: true,
|
||||
children: <div>details</div>,
|
||||
imageUrl: "/wotr.jpg",
|
||||
}
|
||||
Reference in New Issue
Block a user