import { Story, Meta } from '@storybook/react'; import { TextWithBG } from './text-with-bg'; import type { TextWithBGProps } from './text-with-bg'; export default { component: TextWithBG, title: 'Tags and Indicators/Severity', argTypes: { children: { description: 'Textual content to be displayed.' }, severity: { description: 'Status severity (defines the colors used).', options: ['error', 'info', 'success', 'warning'], control: { type: 'select' } }, tooltipText: { description: 'Tooltip title. Zero-length titles string are never displayed.' } } } as Meta; const Template: Story = args => ; export const Primary = Template.bind({}); Primary.args = { children: 'Tag', tooltipText: 'Tag tooltip text' }; export const Error = Template.bind({}); Error.args = { children: 'Error', severity: 'error', tooltipText: 'A problem has been occurred while submitting your data.' }; export const Info = Template.bind({}); Info.args = { children: 'Info', severity: 'info', tooltipText: 'Please read the comments carefully.' }; export const Success = Template.bind({}); Success.args = { children: 'Success', severity: 'success', tooltipText: 'Your message has been sent successfully.' }; export const Warning = Template.bind({}); Warning.args = { children: 'Warning', severity: 'warning', tooltipText: 'There was a problem with your network connection.' };