import type { Meta, StoryObj } from "@storybook/react"; import { fn } from "@storybook/test"; import { Card, CardHeader, CardTitle, CardContent, CardFooter } from "./Card"; import { Button } from "./Button"; const meta = { title: "UI/Card", component: Card, parameters: { layout: "centered", docs: { description: { component: "A flexible card component with header, content, and footer sections.", }, }, }, tags: ["autodocs"], argTypes: { variant: { control: { type: "select" }, options: ["default", "ghost"], description: "Visual style variant of the card", }, hover: { control: { type: "boolean" }, description: "Enable hover effects", }, clickable: { control: { type: "boolean" }, description: "Make card clickable with pointer cursor", }, }, args: { onClick: fn(), }, } satisfies Meta; export default meta; type Story = StoryObj;export const Default: Story = { render: () => (

This is a simple card with just content.

), }; export const WithHeader: Story = { render: () => ( Card Title

This card has a header with a title and some content below.

), }; export const Complete: Story = { render: () => ( Complete Card

This is a complete card with header, content, and footer sections.

It demonstrates all the available card components working together.

), }; export const Clickable: Story = { render: () => ( alert("Card clicked!")}>

This card is clickable and has hover effects. Try clicking it!

), }; export const Ghost: Story = { render: () => (

This is a ghost variant card with minimal styling.

), };