import type { Meta, StoryObj } from '@storybook/react-webpack5'; import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator'; import Carousel from '..'; import { carouselCardsI18n, getStubbedCarouselCards } from './constants'; export default { component: Carousel, title: 'Navigation/Carousel/Tests', tags: ['!autodocs', '!manifest'], } satisfies Meta; type Story = StoryObj; /** Doubled so the track overflows and both scroll buttons render. */ const getManyCards = (i18n: Record) => { const cards = getStubbedCarouselCards(i18n); return [...cards, ...cards.map((card) => ({ ...card, id: `${card.id}_2` }))]; }; export const RTLDiff: Story = { render: () => { const i18n = useRtlDiffI18n(); return ; }, ...withRTLDiff({ width: 'stretch', i18n: { header: { en: 'Pretty nifty stuff', ar: 'أشياء رائعة حقًا' }, ...carouselCardsI18n, }, }), };