import type { Meta, StoryObj } from "@storybook/react" import { Skeleton } from "./Skeleton" /** * A skeleton component for loading states. * * ## Props * - `width`: string | number - Width of the skeleton * - `height`: string | number - Height of the skeleton */ const meta = { title: "base/components/Skeleton", component: Skeleton, tags: ["autodocs"], argTypes: { width: { control: "text", description: "Width of the skeleton", }, height: { control: "text", description: "Height of the skeleton", }, }, parameters: { layout: "centered", }, } satisfies Meta export default meta type Story = StoryObj /** * Basic skeleton with default settings. */ export const Default: Story = { args: { width: "200px", height: "20px", }, } /** * Different sizes of skeleton. */ export const Sizes: Story = { render: () => (
Small
Medium
Large
Extra Large
), } /** * Skeleton with different shapes. */ export const Shapes: Story = { render: () => (
Rectangle
Circle
Rounded
Pill
), } /** * Skeleton for text content. */ export const TextContent: Story = { render: () => (
), } /** * Skeleton for card content. */ export const CardContent: Story = { render: () => (
), } /** * Skeleton for list items. */ export const ListItems: Story = { render: () => (
{Array.from({ length: 5 }).map((_, i) => (
))}
), } /** * Skeleton for form elements. */ export const FormElements: Story = { render: () => (
), } /** * Skeleton for table content. */ export const TableContent: Story = { render: () => (
{Array.from({ length: 4 }).map((_, i) => (
))}
), } /** * Skeleton for image gallery. */ export const ImageGallery: Story = { render: () => (
{Array.from({ length: 6 }).map((_, i) => (
))}
), } /** * Skeleton with custom styling. */ export const CustomStyling: Story = { render: () => (
Custom Colors
Animated
Glow Effect
), }