import React, { ReactText, useState } from 'react'; import { text, withKnobs } from '@storybook/addon-knobs'; import { AnimatedWrapper, Description, Icon, Title, Wrapper } from '../../..'; import { cn } from '../../util/bem'; import './animated-wrapper.component.scss'; export default { title: 'GEENEE-UI/Wrapper', component: Wrapper, decorators: [ withKnobs ] }; const titleDefault = 'Hassle-free time tracking'; // eslint-disable-next-line max-len const descriptionDefault = 'Toggl makes time tracking so simple you’ll actually use it. But even if you forget, our tracking reminders and idle detection have your back'; const className = cn('test-component'); export const _Animated = () => { const [ id, setId ] = useState(1); const content: Record = { 1: ( setId(2) }> { text('Title text', titleDefault) } { text('Description Text', descriptionDefault) } { text('Title text', titleDefault) } { text('Description Text', descriptionDefault) } ), 2: ( setId(1) }>Текст) }; return ( { content[ id ] } ); };