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: ( <>

Card Title

This is a default card with shadow and large spacing.

), }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const WithShadow: Story = { args: { variant: ECardVariant.WITH_SHADOW, children: ( <>

Card with Shadow

Hover over this card to see the shadow effect.

), }, }; export const WithoutShadow: Story = { args: { variant: ECardVariant.WITHOUT_SHADOW, children: ( <>

Card without Shadow

This card has no shadow effect on hover.

), }, }; export const SmallSpacing: Story = { args: { spacing: ECardSpacing.SM, children: ( <>

Small Spacing

This card uses small spacing (p-4).

), }, }; export const LargeSpacing: Story = { args: { spacing: ECardSpacing.LG, children: ( <>

Large Spacing

This card uses large spacing (p-6).

), }, }; export const ColumnDirection: Story = { args: { direction: ECardDirection.COLUMN, children: ( <>

Column Direction

Content is arranged vertically.

), }, }; export const RowDirection: Story = { args: { direction: ECardDirection.ROW, children: ( <>

Row Direction

Content is arranged horizontally.

), }, }; export const ProductCard: Story = { args: { variant: ECardVariant.WITH_SHADOW, spacing: ECardSpacing.LG, direction: ECardDirection.COLUMN, children: ( <>

Product Name

A brief description of the product goes here.

$99.99
), }, }; export const UserCard: Story = { args: { variant: ECardVariant.WITH_SHADOW, spacing: ECardSpacing.LG, direction: ECardDirection.ROW, children: ( <>

John Doe

Software Engineer

john.doe@example.com

), }, }; export const NotificationCard: Story = { args: { variant: ECardVariant.WITHOUT_SHADOW, spacing: ECardSpacing.SM, direction: ECardDirection.COLUMN, children: ( <>

New Message

2m ago

You have received a new message from Alice.

), }, }; export const AllVariants: Story = { render() { return (

With Shadow

Hover to see the shadow effect

Without Shadow

No shadow on hover

); }, }; export const AllSpacings: Story = { render() { return (

Small Spacing (p-4)

Compact padding

Large Spacing (p-6)

More generous padding

); }, }; export const AllDirections: Story = { render() { return (

Column Direction

Vertical layout

Row Direction

Horizontal layout

); }, };