import Tabs, { TabsProps } from '@mui/material/Tabs'; import { Meta, Story } from '@storybook/react'; import { ComponentProps, useState } from 'react'; import Tab from './tab'; type TabProps = ComponentProps; export default { title: 'Buttons/Buttons', argTypes: { tabs: { type: 'number', defaultValue: 3, control: { type: 'range', min: 1, max: 30, step: 1 } }, tabsVariant: { options: ['standard', 'scrollable', 'fullWidth'], control: { type: 'select' } }, disabled: { type: 'boolean' } }, component: Tab } as Meta; const Template: Story< TabProps & { tabs: number; tabsVariant: TabsProps['variant']; } > = ({ tabsVariant, variant, disabled, tabs, ...rest }) => { const [value, setValue] = useState(0); const handleChange = (event: React.SyntheticEvent, newValue: number) => { setValue(newValue); }; const tabIndicatorProps = { style: variant === 'secondary' ? { display: 'none' } : {} }; const tabsArr = Array.from({ length: tabs }, (_, i) => ( )); return ( {tabsArr} ); }; export const NavigationTabs = Template.bind({});