- Batch 6: FAB, FormField, FloatingInput, AvatarUpload - Batch 7: Modal, ConfirmationDialog, ImageViewerModal, ErrorDisplay, LoadingState - Batch 8: DataList, WaveformVisualizer, OptimizedImage, VirtualizedList - Batch 9: ImageCropper, LoadingSpinner, FocusTrap - Achieved total coverage for src/components/ui
41 lines
814 B
TypeScript
41 lines
814 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { LoadingSpinner } from './loading-spinner';
|
|
|
|
const meta = {
|
|
title: 'UI/LoadingSpinner',
|
|
component: LoadingSpinner,
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
size: {
|
|
control: 'select',
|
|
options: ['sm', 'md', 'lg'],
|
|
},
|
|
text: { control: 'text' },
|
|
},
|
|
} satisfies Meta<typeof LoadingSpinner>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
args: {},
|
|
};
|
|
|
|
export const WithText: Story = {
|
|
args: {
|
|
text: 'Loading resources...',
|
|
},
|
|
};
|
|
|
|
export const Small: Story = {
|
|
args: {
|
|
size: 'sm',
|
|
},
|
|
};
|
|
|
|
export const Large: Story = {
|
|
args: {
|
|
size: 'lg',
|
|
text: 'Please wait, this might take a while...',
|
|
},
|
|
};
|