import React from 'react'; import { DISPLAY, FLEX_DIRECTION, IconColor, TextColor, Size, SEVERITIES, } 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', component: HelpText, parameters: { docs: { page: README, }, }, argTypes: { children: { control: 'text', }, className: { control: 'text', }, severity: { control: 'select', options: Object.values(SEVERITIES), }, color: { control: 'select', options: Object.values(TextColor), }, }, 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 SeverityStory = (args) => ( <> HelpText without severity prop HelpText with severity: SEVERITY.DANGER HelpText with severity: SEVERITY.SUCCESS HelpText with severity: SEVERITY.WARNING HelpText with severity: SEVERITY.INFO ); SeverityStory.storyName = 'Severity'; export const ColorStory = (args) => ( This HelpText default color is TextColor.textDefault This HelpText color is TextColor.textAlternative This HelpText color is TextColor.textMuted ); ColorStory.storyName = 'Color';