import type { Meta, StoryObj } from "@storybook/react-vite"; import { Skeleton } from "@shared/components/Skeleton"; const meta: Meta = { title: "Primitives/Skeleton", component: Skeleton, tags: ["autodocs"], parameters: { layout: "padded" }, args: { width: "20rem", shape: "text", lines: 1 }, argTypes: { shape: { control: "inline-radio", options: ["text", "rect", "circle"] }, lines: { control: { type: "number", min: 1, max: 8 } }, width: { control: "text" }, height: { control: "text" }, }, }; export default meta; type Story = StoryObj; /** Flip shape / lines / width / height in controls. */ export const Playground: Story = {}; export const InContext_TableRow: Story = { render: () => (
), }; export const InContext_ActivityFeed: Story = { render: () => (
{Array.from({ length: 4 }).map((_, i) => (
))}
), };