import { Meta, StoryObj } from '@storybook/react-webpack5'; import CriticalCommsBanner from '..'; import { withVariantConfig } from '../../../../.storybook/helpers'; import { useRtlDiffI18n, withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator'; export default { component: CriticalCommsBanner, title: 'Prompts/CriticalCommsBanner/Tests', tags: ['!autodocs', 'deprecated', 'deprecated'], } satisfies Meta; type Story = StoryObj; export const Sentiments: Story = { render: (args) => ( <> ), args: { subtitle: 'Add money within the next 30 days', action: { label: 'Take action', href: 'https://wise.com' }, className: 'm-b-1', }, ...withVariantConfig([ 'default', 'dark', 'bright-green', 'forest-green', 'business', 'business--forest-green', 'business--bright-green', ]), }; export const Mobile: Story = { args: { subtitle: 'Add money within the next 30 days', action: { label: 'Take action', href: 'https://wise.com' }, className: 'm-b-1', }, ...withVariantConfig(['mobile']), }; export const Zoom: Story = { args: { subtitle: 'Add money within the next 30 days', action: { label: 'Take action', href: 'https://wise.com' }, className: 'm-b-1', }, ...withVariantConfig(['400%']), }; export const WithoutAction: Story = { render: (args) => ( <> ), args: { subtitle: 'Add money within the next 30 days', className: 'm-b-1', }, ...withVariantConfig(['default']), }; export const RTLDiff: Story = { render: () => { const i18n = useRtlDiffI18n(); return ( <> ); }, ...withRTLDiff({ i18n: { title: { en: 'Your account is overdrawn', ar: 'حسابك مكشوف' }, subtitle: { en: 'Add money within the next 30 days', ar: 'أضف أموالًا خلال 30 يومًا' }, actionLabel: { en: 'Take action', ar: 'اتخذ إجراءً' }, }, }), };