import type { Meta, StoryObj } from '@storybook/react-vite'; import { useEffect, useState } from 'react'; import { type ComponentMatrixCellProps, Story } from './_internal/Story'; import { Progress } from './Progress'; import { Text } from './Text'; import { XStack } from './XStack'; import { YStack } from './YStack'; const meta = { args: { value: 50, }, component: Progress, parameters: { layout: 'fullscreen' }, title: 'components/Progress', } satisfies Meta; export default meta; type StoryDefinition = StoryObj; const VALUE_ROWS = [{ key: 'default', label: 'Default' }]; const STATE_COLUMNS = [ { key: '25', label: '25%' }, { key: '50', label: '50%' }, { key: '75', label: '75%' }, { key: '100', label: 'Complete' }, ]; function AnimatedProgress() { const [value, setValue] = useState(20); useEffect(() => { const interval = window.setInterval(() => { setValue((current) => (current >= 100 ? 0 : Math.min(100, current + 10))); }, 900); return () => window.clearInterval(interval); }, []); return ( Export data ); } function ProgressValueCell({ column }: ComponentMatrixCellProps) { return ; } export const All: StoryDefinition = { args: { value: 50, }, render: () => ( Design capacity Engineering 63% ), };