import type { Meta, StoryObj } from "@storybook/react"; import { Loading } from "./Loading"; const meta = { title: "UI/Loading", component: Loading, parameters: { layout: "centered", docs: { description: { component: "A loading indicator component with multiple variants, sizes, and color themes.", }, }, }, tags: ["autodocs"], argTypes: { variant: { control: { type: "select" }, options: ["spinner", "bars", "ring"], description: "Loading animation variant", }, size: { control: { type: "select" }, options: ["xs", "sm", "md", "lg", "xl"], description: "Size of the loading indicator", }, color: { control: { type: "select" }, options: ["primary", "secondary", "muted"], description: "Color theme of the loading indicator", }, overlay: { control: { type: "boolean" }, description: "Show with overlay background", }, text: { control: { type: "text" }, description: "Loading text to display", }, }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { args: {}, }; export const WithText: Story = { args: { text: "Loading...", }, }; export const Sizes: Story = { render: () => (
), };export const Variants: Story = { render: () => (

Spinner

Bars

Ring

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

Primary

Secondary

Muted

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

Content behind overlay

), };