import React from 'react' import { Meta, Story } from '@storybook/react' import TextInput, { TextInputProps } from './TextInput.component' const meta: Meta = { title: 'Backlog/TextInput', component: TextInput, parameters: { controls: { expanded: true }, design: { type: 'figma' } } } export default meta interface Props extends TextInputProps { value(value: any): [any, any] disabled: any darkMode: boolean } const StoryTextInput: Story = args => { const [text1, setText1] = React.useState(args.value) const handleChange = (value: string) => { setText1(value) } return ( <>
) } export const Default = StoryTextInput.bind({}) Default.args = { darkMode: false, disabled: false, value: 'teste' } Default.parameters = { controls: { exclude: [ 'value', 'type', 'handleChange', 'label', 'leadingText', 'placeholder', 'error', 'helperText', 'LeadingIcon', 'TrailingIcon' ] } }