import type { Meta, StoryObj } from "@storybook/react-vite"; import { Card, ECardVariant, ECardSpacing, ECardDirection } from "./card"; const meta = { title: "Components/Card", component: Card, parameters: { layout: "centered", }, tags: ["autodocs"], args: { children: ( <>
This is a default card with shadow and large spacing.
> ), }, } satisfies MetaHover over this card to see the shadow effect.
> ), }, }; export const WithoutShadow: Story = { args: { variant: ECardVariant.WITHOUT_SHADOW, children: ( <>This card has no shadow effect on hover.
> ), }, }; export const SmallSpacing: Story = { args: { spacing: ECardSpacing.SM, children: ( <>This card uses small spacing (p-4).
> ), }, }; export const LargeSpacing: Story = { args: { spacing: ECardSpacing.LG, children: ( <>This card uses large spacing (p-6).
> ), }, }; export const ColumnDirection: Story = { args: { direction: ECardDirection.COLUMN, children: ( <>Content is arranged vertically.
> ), }, }; export const RowDirection: Story = { args: { direction: ECardDirection.ROW, children: ( <>Content is arranged horizontally.
A brief description of the product goes here.
Software Engineer
john.doe@example.com
You have received a new message from Alice.
> ), }, }; export const AllVariants: Story = { render() { return (Hover to see the shadow effect
No shadow on hover
Compact padding
More generous padding
Vertical layout
Horizontal layout