import type { Meta, StoryObj } from '@storybook/react'; import { ScrollArea } from './ScrollArea'; const meta = { title: 'UI/ScrollArea/ScrollArea', component: ScrollArea, parameters: { layout: 'centered' }, tags: ['autodocs'] } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: () => (

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam auctor, nisl eget ultricies tincidunt, nisl nisl aliquam nisl, eget ultricies nisl nisl eget nisl.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur.

) }; export const TallContent: Story = { render: () => (
{Array.from({ length: 50 }).map((_, i) => (
Row {i + 1}
))}
) }; export const WideContent: Story = { render: () => (

This content is intentionally wider than the container to demonstrate horizontal scrolling. The ScrollArea component will automatically add scrollbars as needed.

{Array.from({ length: 10 }).map((_, i) => (
{i + 1}
))}
) }; export const CustomHeight: Story = { render: () => (

Taller Scroll Area

{Array.from({ length: 20 }).map((_, i) => (

Paragraph {i + 1}: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

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

Nested Content Example

Main content area with some text.

Nested Section

This is nested content inside the scroll area.

{Array.from({ length: 10 }).map((_, i) => (

Section {i + 1}

Additional content for demonstrating scrolling behavior.

))}
) };