import type { Meta, StoryObj } from '@storybook/nextjs' import Loading from '.' const meta = { title: 'Base/Feedback/Loading', component: Loading, parameters: { layout: 'centered', docs: { description: { component: 'Spinner used while fetching data (`area`) or bootstrapping the full application shell (`app`).', }, }, }, argTypes: { type: { control: 'radio', options: ['area', 'app'], }, }, args: { type: 'area', }, tags: ['autodocs'], } satisfies Meta export default meta type Story = StoryObj const LoadingPreview = ({ type }: { type: 'area' | 'app' }) => { const containerHeight = type === 'app' ? 'h-48' : 'h-20' const title = type === 'app' ? 'App loading state' : 'Inline loading state' return (
{title}
) } export const AreaSpinner: Story = { render: () => , } export const AppSpinner: Story = { render: () => , }