// // Copyright 2026 DXOS.org // import '../../theme/index.css'; import { type Meta, type StoryObj } from '@storybook/react-vite'; import React, { useCallback, useState } from 'react'; import { expect, userEvent, waitFor, within } from 'storybook/test'; import { withLayout, withTheme } from '../../testing/index.ts'; import { SIZE_ARG_TYPES, type SizeArgs } from '../../testing/stories.tsx'; import { Button } from '../Button/Button.tsx'; import * as Panel from '../Panel/Panel.tsx'; import * as Toolbar from '../Toolbar/Toolbar.tsx'; import * as Typography from '../Typography/Typography.tsx'; import * as ScrollContainer from './ScrollContainer.tsx'; type StoryArgs = SizeArgs & Pick; const DefaultStory = ({ pin }: StoryArgs) => { const [rows, setRows] = useState(() => Array.from({ length: 100 }, (_, index) => `Entry ${index + 1}`)); const handleAdd = useCallback(() => { setRows((rows) => [...rows, `Entry ${rows.length + 1}`]); }, [setRows]); return (