import React from 'react' import { type Meta, type StoryObj } from '@storybook/react' import { FieldMessage } from '../index' const meta = { title: 'Components/Form primitives/FieldMessage', component: FieldMessage, args: { message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullasemper odio vitae sem gravida rutrum.', }, } satisfies Meta export default meta type Story = StoryObj export const Playground: Story = { parameters: { docs: { canvas: { sourceState: 'shown', }, }, }, } export const HelperText: Story = { args: { message: 'Your email address will be used to send survey notifications and reports', }, } export const DetailedHelperText: Story = { args: { message: (
Your email address will be used to send survey notifications and reports. Learn more about{' '} how your data will be used
), }, } export const Error: Story = { args: { status: 'error', message: 'Invalid email provided.' }, } export const Cautionary: Story = { args: { status: 'caution', message: 'Do not share your password or account details.', }, } export const Success: Story = { args: { status: 'success', message: 'Your account has been created' }, } export const Reversed: Story = { args: { reversed: true, status: 'error' }, parameters: { backgrounds: { default: 'Purple 700' } }, name: 'reversed', } export const Position: Story = { args: { position: 'bottom' }, render: (args) => (
), }