import type { Meta, StoryObj } from "@storybook/react" import { Spinner } from "./Spinner" /** * A spinner component for loading states. * * ## Props * - `size`: "1" | "2" | "3" (default: "2") */ const meta = { title: "base/components/Spinner", component: Spinner, tags: ["autodocs"], argTypes: { size: { control: "select", options: ["1", "2", "3"], description: "Size of the spinner", }, }, parameters: { layout: "centered", }, } satisfies Meta export default meta type Story = StoryObj /** * Basic spinner with default settings. */ export const Default: Story = { args: {}, } /** * Different sizes of spinner. */ export const Sizes: Story = { render: () => (

Size 1

Size 2

Size 3

), } /** * Spinner with text. */ export const WithText: Story = { render: () => (
Loading...
Please wait
Processing your request
), } /** * Spinner in different contexts. */ export const Contexts: Story = { render: () => (

Loading content...

Saving changes...

Error occurred

Retrying connection...

), } /** * Spinner with custom styling. */ export const CustomStyling: Story = { render: () => (

Custom Blue

Custom Green

Custom Purple

), } /** * Spinner in buttons. */ export const InButtons: Story = { render: () => (
), } /** * Spinner with different loading states. */ export const LoadingStates: Story = { render: () => (

Initializing...

Setting up your workspace

Uploading...

File upload in progress

Processing...

Analyzing data

Finalizing...

Almost done

), }