import React from 'react';
import {
DISPLAY,
FLEX_DIRECTION,
Color,
TextColor,
Size,
} 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',
},
error: {
control: 'boolean',
},
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 ErrorStory = (args) => (
This HelpText in error state
);
ErrorStory.storyName = 'Error';
export const ColorStory = (args) => (
This HelpText default color is Color.textDefault
This HelpText color is Color.infoDefault
This HelpText color is Color.warningDefault
This HelpText color is Color.successDefault
);
ColorStory.storyName = 'Color';