import { StoryObj } from '@storybook/react-webpack5'; import { Suitcase } from '@transferwise/icons'; import { InlinePrompt } from '../InlinePrompt'; import { withVariantConfig } from '../../../../.storybook/helpers'; import { useRtlDiffI18n, withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator'; export default { title: 'Prompts/InlinePrompt/Tests', component: InlinePrompt, tags: ['!autodocs'], }; type Story = StoryObj; export const TinyScreen: Story = { render: () => ( }> Your travel money account is now active and ready to use for international transactions. ), ...withVariantConfig(['400%']), }; export const RTLDiff: Story = { render: () => { const i18n = useRtlDiffI18n(); return ( <> {/* default icon at inline-start, auto width */} {i18n.defaultIcon} {/* custom media icon, auto width */} }> {i18n.customIcon} {/* full width — icon position flips */} } width="full"> {i18n.fullWidth} {/* multi-line content — verifies wrapping alignment */} {i18n.multiLine} ); }, ...withRTLDiff({ fixedRows: { heights: 'auto' }, i18n: { defaultIcon: { en: 'Short content with default icon.', ar: 'محتوى قصير مع الأيقونة الافتراضية.', }, customIcon: { en: 'Custom icon with auto width.', ar: 'أيقونة مخصصة بعرض تلقائي.' }, fullWidth: { en: 'Custom icon with full width.', ar: 'أيقونة مخصصة بعرض كامل.' }, multiLine: { en: 'This prompt has longer content that may wrap to multiple lines to verify that the icon alignment remains correct in RTL layout.', ar: 'يحتوي هذا التنبيه على محتوى أطول قد يمتد على عدة أسطر للتحقق من أن محاذاة الأيقونة تظل صحيحة في التصميم من اليمين إلى اليسار.', }, }, }), };