import type { Meta, StoryObj } from "@storybook/react-vite"; import { CardLayout } from "./CardLayout"; const meta = { title: "Components/Card", component: CardLayout, tags: ["autodocs"], parameters: { layout: "centered" }, argTypes: { shape: { control: "select", options: ["SQUARED", "SEMI_ROUNDED", "ROUNDED"], }, padding: { control: "select", options: ["NONE", "EVEN_LESS", "LESS", "STANDARD", "MORE", "EVEN_MORE"], }, style: { control: "select", options: [ "NONE", "ACCENT", "SUCCESS", "WARN", "ERROR", "INFO", "CHARCOAL_SCHEME", ], }, decorativeBarPosition: { control: "select", options: ["TOP", "START"] }, decorativeBarColor: { control: "select", options: ["ACCENT", "SUCCESS", "WARN", "ERROR", "INFO"], }, marginAbove: { control: "select", options: ["NONE", "EVEN_LESS", "LESS", "STANDARD", "MORE", "EVEN_MORE"], }, marginBelow: { control: "select", options: ["NONE", "EVEN_LESS", "LESS", "STANDARD", "MORE", "EVEN_MORE"], }, }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { args: { shape: "SEMI_ROUNDED", padding: "STANDARD", showBorder: true, children: (

Default Card

A standard card with border and semi-rounded corners.

), }, }; export const DecorativeBarTop: Story = { args: { shape: "SQUARED", padding: "STANDARD", showBorder: true, decorativeBarPosition: "TOP", decorativeBarColor: "ACCENT", borderColor: "#9191F8", children: (

Reference Information

This card uses a top decorative bar to indicate reference content.

), }, }; export const DecorativeBarStart: Story = { args: { shape: "SQUARED", padding: "STANDARD", showBorder: true, decorativeBarPosition: "START", decorativeBarColor: "WARN", borderColor: "#FFE47F", children: (

Warning

This card uses a start decorative bar.

), }, }; export const DecorativeBarColors: Story = { args: { children: null }, render: () => (

Accent bar

Success bar

Warn bar

Error bar

Info bar

), }; export const Shapes: Story = { args: { children: null }, render: () => (

Squared

0 radius

Semi Rounded

4px radius

Rounded

8px radius

), }; export const BorderOnly: Story = { args: { shape: "SEMI_ROUNDED", padding: "STANDARD", showBorder: true, showShadow: false, children: (

Border Only

No shadow

), }, }; export const ShadowOnly: Story = { args: { shape: "SEMI_ROUNDED", padding: "STANDARD", showBorder: false, showShadow: true, children: (

Shadow Only

No border

), }, }; export const BorderAndShadow: Story = { args: { shape: "SEMI_ROUNDED", padding: "STANDARD", showBorder: true, showShadow: true, children: (

Border and Shadow

Both border and shadow

), }, }; export const CardStyles: Story = { args: { children: null }, render: () => (

Accent

Success

Warn

Error

Info

Charcoal

Navy

Plum

), };