import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { usePropState } from '@anton.bobrov/react-hooks'; import { Marquee } from '.'; type TComponent = typeof Marquee; const meta: Meta = { title: 'Text/Marquee', component: Marquee, tags: ['autodocs'], argTypes: { children: { table: { disable: true } }, }, args: { gap: 10, children: 'Marquee text', }, }; export default meta; const Template: StoryFn = ({ isEnabled: isEnabledProp, speed: speedProp = 1, ...props }) => { const [isEnabled, setIsEnabled] = usePropState(isEnabledProp); const [speed, setSpeed] = usePropState(speedProp); return ( <>

); }; export const Default = Template.bind({}); Default.args = { canCloneNodes: true, }; export const WithNotClonableText = Template.bind({}); WithNotClonableText.args = {}; export const WithReverseSpeed = Template.bind({}); WithReverseSpeed.args = { speed: -1, }; export const WithHTMLElements = Template.bind({}); WithHTMLElements.args = { children: [
,
,
,
,
,
,
, ], speed: 3, };