import React from 'react'; import { storybookArgTypes, StoryMetaType, StoryType, } from '@lg-tools/storybook-utils'; import LeafygreenProvider from '@leafygreen-ui/leafygreen-provider'; import TextArea, { State, TextAreaProps } from '.'; type LGProviderBaseFontSize = 14 | 16; const meta: StoryMetaType = { title: 'Components/Inputs/TextArea', component: TextArea, parameters: { default: 'LiveExample', generate: { combineArgs: { darkMode: [false, true], baseFontSize: [13, 16], label: [undefined, 'Label'], description: [undefined, 'This is a description for the text area'], state: Object.values(State), disabled: [false, true], }, excludeCombinations: [ { label: undefined, description: 'This is a description for the text area', }, ], }, }, argTypes: { baseFontSize: { options: [undefined, 13, 16], control: { type: 'radio' }, }, label: { control: 'text' }, description: { control: 'text' }, errorMessage: { control: 'text' }, darkMode: storybookArgTypes.darkMode, }, args: { label: 'Label', description: 'This is a description for the text area', errorMessage: 'This is an error message', disabled: false, placeholder: 'Placeholder', readOnly: false, }, }; export default meta; interface FontSizeProps { baseFontSize: LGProviderBaseFontSize; } export const LiveExample: StoryType = ({ darkMode, baseFontSize, ...args }: TextAreaProps & FontSizeProps) => (