import { home, loading, refreshArrow } from "@simplybusiness/icons"; import type { Meta, StoryObj } from "@storybook/react"; import type { LoadingIndicatorProps } from "./LoadingIndicator"; import { LoadingIndicator } from "./LoadingIndicator"; const iconOptions = { loading, refreshArrow, home }; type StoryType = StoryObj; const meta: Meta = { title: "Components/LoadingIndicator", component: LoadingIndicator, argTypes: { icon: { options: Object.keys(iconOptions), mapping: iconOptions, control: { type: "radio" }, }, color: { options: ["darkcyan", "deeppink", "royalblue", "tomato"], control: { type: "radio" }, }, }, }; export const Default: StoryType = { render: (args: LoadingIndicatorProps) => , args: { icon: loading, size: "md", }, }; export const Large: StoryType = { render: (args: LoadingIndicatorProps) => , args: { icon: loading, size: "lg", }, }; export const WithCustomColour: StoryType = { render: (args: LoadingIndicatorProps) => , args: { icon: loading, size: "md", color: "tomato", }, }; export const WithCustomIcon: StoryType = { render: (args: LoadingIndicatorProps) => , args: { icon: refreshArrow, size: "md", }, }; export default meta;