import type { Meta, StoryObj } from '@storybook/react-webpack5'; import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator'; import { Size } from '../../common'; import Decision, { DecisionPresentation, DecisionType } from '..'; import AvatarView from '../../AvatarView'; export default { component: Decision, title: 'Layouts/Decision/Tests', tags: ['!autodocs', '!manifest'], } satisfies Meta; type Story = StoryObj; /** * NavigationOption renders media on the inline-start side and a chevron on the * inline-end side; these flip in RTL. The LIST_BLOCK and LIST_BLOCK_GRID * presentations use flex-row layout that also reverses direction in RTL. */ export const RTLDiff: Story = { render: () => { const i18n = useRtlDiffI18n(); const options = [ { title: i18n.sendTitle, description: i18n.sendDescription, href: '#', 'aria-label': i18n.sendTitle, media: { block: ( ), list: , }, }, { title: i18n.receiveTitle, description: i18n.receiveDescription, href: '#', 'aria-label': i18n.receiveTitle, media: { block: ( ), list: , }, }, ]; return ( <> ); }, ...withRTLDiff({ fixedRows: { heights: 'auto' }, i18n: { sendTitle: { en: 'Send money', ar: 'إرسال الأموال' }, sendDescription: { en: 'Fast international transfers.', ar: 'تحويلات دولية سريعة.' }, receiveTitle: { en: 'Receive money', ar: 'استلام الأموال' }, receiveDescription: { en: 'Get paid from abroad.', ar: 'استلم أموالك من الخارج.' }, profileName: { en: 'Alice Smith', ar: 'أليس سميث' }, }, }), };