import { Container } from '@/ui/Container'; import { Heading } from '@/ui/Heading'; import { Stack } from '@/ui/Stack'; import { Grid } from '@/ui/Grid'; import { Text } from '@/ui/Text'; import { Section } from '@/ui/Section'; import { Panel } from '@/ui/Panel'; interface AlternatingSectionProps { heading: string; description: string | React.ReactNode; mockup: React.ReactNode; layout: 'text-left' | 'text-right'; } export function AlternatingSection({ heading, description, mockup, layout, }: AlternatingSectionProps) { const textContent = ( {heading} {typeof description === 'string' ? ( {description} ) : ( description )} ); const mockupContent = ( {mockup} ); return (
{layout === 'text-left' ? ( <> {textContent} {mockupContent} ) : ( <> {mockupContent} {textContent} )}
); }