import { Meta, StoryObj } from '@storybook/react-vite' import { ScrollArea, Separator } from '../' interface Artwork { artist: string art: string } const tags = Array.from({ length: 50 }).map( (_, i, a) => `v1.2.0-beta.${a.length - i}`, ) export function ScrollAreaVertical() { return (

Tags

{tags.map((tag) => ( <>
{tag}
))}
) } const works: Artwork[] = [ { artist: 'Ornella Binni', art: 'https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80', }, { artist: 'Tom Byrom', art: 'https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80', }, { artist: 'Vladimir Malyavko', art: 'https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80', }, ] //meta === docs do componente, os types de controls, posição do elemento, valores inicias, armazenar o componente const meta = { title: 'Scroll-area', component: ScrollAreaVertical, parameters: { layout: 'centered', }, } satisfies Meta export default meta type Story = StoryObj export const ScrollAreaHorizontal: Story = { args: {}, render: () => { return ( <>
{works.map((artwork) => (
{`Photo
Photo by{' '} {artwork.artist}
))}
) }, }