import type { Meta, StoryObj } from '@storybook/react-webpack5'; import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator'; import Drawer from '..'; export default { component: Drawer, title: 'Dialogs/Drawer/Tests/RTL Diff', tags: ['!autodocs', '!manifest'], } satisfies Meta; type Story = StoryObj; export const PositionRight: Story = { render: () => { const i18n = useRtlDiffI18n(); return ( {i18n.done}} onClose={() => {}} >

{i18n.body}

); }, ...withRTLDiff({ renderAs: 'iframe', i18n: { title: { en: 'Drawer title', ar: 'عنوان اللوحة' }, done: { en: 'Done', ar: 'تم' }, body: { en: 'Drawer body content.', ar: 'محتوى اللوحة الجانبية.' }, }, }), }; export const PositionLeft: Story = { render: () => { const i18n = useRtlDiffI18n(); return ( {i18n.done}} onClose={() => {}} >

{i18n.body}

); }, ...withRTLDiff({ renderAs: 'iframe', i18n: { title: { en: 'Left drawer title', ar: 'عنوان اللوحة اليسرى' }, done: { en: 'Done', ar: 'تم' }, body: { en: 'Left drawer body content.', ar: 'محتوى اللوحة اليسرى.' }, }, }), }; export const WithoutTitle: Story = { render: () => { const i18n = useRtlDiffI18n(); return ( {i18n.done}} onClose={() => {}} >

{i18n.body}

); }, ...withRTLDiff({ renderAs: 'iframe', i18n: { done: { en: 'Done', ar: 'تم' }, body: { en: 'No title drawer content.', ar: 'محتوى لوحة بدون عنوان.' }, }, }), };