import React from 'react'; import { Column, Row, Section, Text } from '@react-email/components'; import { theme } from '../theme'; import { Card } from './Card'; export interface OrderLineItem { name: string; qty: number; price: string; } interface OrderSummaryProps { orderId: string; items: OrderLineItem[]; total: string; orderLabel: string; totalLabel: string; } export const OrderSummary = ({ orderId, items, total, orderLabel, totalLabel, }: OrderSummaryProps) => ( {orderLabel}: {orderId} {items.map((item) => ( {item.name} × {item.qty} {item.price} ))}
{totalLabel}: {total}
); const label = { color: theme.colors.muted, fontSize: '13px', margin: '0 0 12px', }; const row = { marginBottom: '6px', }; const itemText = { color: theme.colors.forest, fontSize: '14px', margin: 0, }; const totalRow = { borderTop: `1px solid ${theme.colors.line}`, marginTop: '12px', paddingTop: '12px', }; const totalText = { color: theme.colors.forest, fontSize: '16px', fontWeight: 700, margin: 0, };