import { Illustration } from '@wise/art'; import Display from '../../Display'; import type { CarouselCard } from '../Carousel'; /** * Every string the stubbed cards render, shaped as a `withRTLDiff({ i18n })` map so the RTL diff * can spread it — that call site is what type-checks the shape against `I18nMap`. The type is not * imported here: this file is part of the Rollup build, which cannot emit declarations that * reference `.storybook/`. The promo card's `Wise` title is a brand name and stays in Latin script. */ export const carouselCardsI18n = { globeCardTitle: { en: 'Here there, everywhere', ar: 'هنا وهناك وفي كل مكان' }, promoDescription: { en: 'The best way to move money internationally', ar: 'أفضل طريقة لتحويل الأموال دوليًا', }, quickPayCardTitle: { en: 'Get Quick Pay', ar: 'احصل على الدفع السريع' }, }; /** * Takes copy already resolved for one language — exactly what `useRtlDiffI18n()` returns — so the * same fixture serves the single-direction stories and the RTL diff. */ export const getStubbedCarouselCards = (i18n: Record): CarouselCard[] => [ { id: 'YOUR_INVOICE', type: 'button', onClick: () => { console.log('Clicked on button'); }, content: (
{i18n.globeCardTitle}
), }, { id: 'YOUR_WEBSITE', type: 'promo', onClick: () => { console.log('hi'); }, href: 'http://wise.com', title: 'Wise', description: i18n.promoDescription, }, { id: 'SHOP_OR_STALL', type: 'anchor', href: 'https://wise.com', hrefTarget: '_blank', onClick: () => {}, styles: { backgroundImage: 'url(https://wise.com/public-resources/assets/team-page/tapestry/team_member_tapestry_01.jpg)', backgroundSize: 'cover', }, content: {i18n.quickPayCardTitle}, }, ]; const englishCopy = Object.fromEntries( Object.entries(carouselCardsI18n).map(([key, entry]) => [key, entry.en]), ); export const stubbedCarouselCards = getStubbedCarouselCards(englishCopy);