import { useState } from 'react' import type { Meta, StoryFn, StoryObj } from '@storybook/react' import { Button } from '~/src/components/Button' import { LegacyHStack, LegacySpacer, LegacyStackItem, LegacyVStack, } from '~/src/components/LegacyStack' import { Text } from '~/src/components/Text' import { ProgressBar } from './ProgressBar' import mdx from './ProgressBar.mdx' import type { ProgressBarProps } from './ProgressBar.types' const meta: Meta = { component: ProgressBar, parameters: { docs: { page: mdx, }, }, argTypes: { size: { control: { type: 'radio', }, }, variant: { control: { type: 'radio', }, }, width: { control: { type: 'text', }, }, value: { control: { type: 'range', min: 0, max: 1, step: 0.01, }, }, }, tags: ['!autodocs'], } export default meta export const Primary: StoryObj = { render: (props) => , args: { size: 'm', variant: 'green', width: 36, value: 0.5, }, } export const Overview: StoryFn<{}> = () => { const [values, setValues] = useState([0.25, 0.5, 0.75, 1]) const handleSetRandomValues = () => { setValues([...Array(4)].map(() => Math.random())) } return (