import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { times, usePropState } from '@anton.bobrov/react-hooks'; import { FadeContent } from '.'; type TComponent = typeof FadeContent; const meta: Meta = { title: 'Wrappers/FadeContent', component: FadeContent, tags: ['autodocs'], args: { style: { backgroundColor: '#ccc', }, }, argTypes: { content: { table: { disable: true } }, }, }; export default meta; const Template: StoryFn = ({ activeKey: activeKeyProp, content, ...props }) => { const [activeKey, setActiveKey] = usePropState(activeKeyProp); return ( <> ); }; export const Default = Template.bind({}); Default.args = { activeKey: 1, content: [ { key: 0, children: times((index) =>
Content 0
, 5), }, { key: 1, children: times((index) =>
Content 1
, 10), }, { key: 2, children: times((index) =>
Content 2
, 15), }, ], };