import React from 'react'; import { DISPLAY, FLEX_DIRECTION, COLORS, TEXT_COLORS, SIZES, } from '../../../helpers/constants/design-system'; import Box from '../../ui/box'; import { Icon, ICON_NAMES } from '..'; import { HelpText } from './help-text'; import README from './README.mdx'; export default { title: 'Components/ComponentLibrary/HelpText', id: __filename, component: HelpText, parameters: { docs: { page: README, }, }, argTypes: { children: { control: 'text', }, className: { control: 'text', }, error: { control: 'boolean', }, color: { control: 'select', options: Object.values(TEXT_COLORS), }, }, args: { children: 'Help text', }, }; const Template = (args) => ; export const DefaultStory = Template.bind({}); DefaultStory.storyName = 'Default'; export const Children = (args) => ( Plain text Text and icon ); export const ErrorStory = (args) => ( This HelpText in error state ); ErrorStory.storyName = 'Error'; export const Color = (args) => ( This HelpText default color is COLORS.TEXT_DEFAULT This HelpText color is COLORS.INFO_DEFAULT This HelpText color is COLORS.WARNING_DEFAULT This HelpText color is COLORS.SUCCESS_DEFAULT );