Status badge and step bar over line-item thumbnails, delivery address, payment tile, and receipt summary — with track, buy-again, and cancel actions
import * as React from "react";
import { View, ScrollView, Pressable } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Badge, Button, Card, Glass, Icon, Image, Separator, Steps, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { BLOCK_STAGGER, catalogImg, LumioMark, Mount, Press, World } from "../shared";
export type OrderDetailStatus = "processing" | "in-transit" | "delivered" | "cancelled";
export interface OrderLineItem {
name: string;
/** "Camel · M" */
variantLabel?: string;
quantity: number;
price: number;
imageUrl?: string;
}
export interface OrderDetail {
id: string;
date: string;
status: OrderDetailStatus;
/** "Arrives Fri, Sep 18" — active orders only. */
eta?: string;
items: OrderLineItem[];
address: {
name: string;
line1: string;
line2?: string;
city: string;
postalCode: string;
};
payment: { brand: string; last4: string };
subtotal: number;
shipping: number;
tax?: number;
total: number;
}
export interface OrderDetailScreenProps {
order?: OrderDetail;
currency?: string;
onTrack?: (order: OrderDetail) => void;
onReorder?: (order: OrderDetail) => void;
/** Only rendered while the order is still cancellable (processing). */
onCancelOrder?: (order: OrderDetail) => void;
onHelp?: (order: OrderDetail) => void;
onBack?: () => void;
}
const img = (p: Parameters<typeof catalogImg>[0]) => catalogImg(p, 160, 200);
// Same parcel as orders.tsx/tracking.tsx: HL-2094, confirmed Sep 15,
// arriving Sep 18 — overcoat $248 + 2× garment-dyed tee $210
// + 2× heritage tee $170 = $628, free shipping.
const DEFAULT_ORDER: OrderDetail = {
id: "HL-2094",
date: "Sep 15, 2026",
status: "in-transit",
eta: "Arrives Fri, Sep 18",
items: [
{ name: "Structured Wool Overcoat", variantLabel: "Camel · M", quantity: 1, price: 248, imageUrl: img("overcoat") },
{ name: "Garment-Dyed Tee", variantLabel: "Sage · S", quantity: 2, price: 105, imageUrl: img("tee") },
{ name: "Heritage Graphic Tee", variantLabel: "Indigo · M", quantity: 2, price: 85, imageUrl: img("graphicTee") },
],
address: {
name: "Amara Chen",
line1: "421 Harbor Lane",
line2: "Apt 5B",
city: "San Francisco, CA",
postalCode: "94107",
},
payment: { brand: "Visa", last4: "4821" },
subtotal: 628,
shipping: 0,
total: 628,
};
const STAGES = ["Ordered", "Shipped", "Out for delivery", "Delivered"];
const STATUS_STAGE: Record<OrderDetailStatus, number> = {
processing: 0,
"in-transit": 2,
delivered: 3,
cancelled: 0,
};
const STATUS_META: Record<
OrderDetailStatus,
{ label: string; variant: "warning" | "info" | "success" | "destructive"; icon: "clock" | "truck" | "check" | "x" }
> = {
processing: { label: "Processing", variant: "warning", icon: "clock" },
"in-transit": { label: "In transit", variant: "info", icon: "truck" },
delivered: { label: "Delivered", variant: "success", icon: "check" },
cancelled: { label: "Cancelled", variant: "destructive", icon: "x" },
};
const fmt = (n: number, currency = "$") =>
`${currency}${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
function SummaryRow({
label,
value,
bold,
}: {
label: string;
value: string;
bold?: boolean;
}) {
return (
<View className="flex-row items-center justify-between py-1">
<Text variant={bold ? "large" : "muted"}>{label}</Text>
<Text variant={bold ? "large" : "small"} className="tabular-nums">
{value}
</Text>
</View>
);
}
/** Order detail — status + step bar, line items with thumbnails, delivery
* address, payment, summary, and contextual track/cancel/help actions. */
export function OrderDetailScreen({
order = DEFAULT_ORDER,
currency = "$",
onTrack,
onReorder,
onCancelOrder,
onHelp,
onBack,
}: OrderDetailScreenProps) {
const haptics = useHaptic();
const insets = useSafeAreaInsets();
const meta = STATUS_META[order.status];
const active = order.status === "in-transit" || order.status === "processing";
const itemCount = order.items.reduce((s, i) => s + i.quantity, 0);
return (
<World primary="#65A30D">
<SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
{/* Floating chrome — back disc + centered order pill + status badge. */}
<View pointerEvents="box-none" className="absolute inset-x-4 z-10" style={{ top: insets.top + 8 }}>
<View className="flex-row items-center justify-between">
<Glass interactive effect="regular" className="h-11 w-11 items-center justify-center rounded-full">
<Press
haptic="light"
onPress={() => onBack?.()}
accessibilityRole="button"
accessibilityLabel="Go back"
className="h-9 w-9 items-center justify-center"
>
<Icon name="chevron-left" size="md" color="foreground" />
</Press>
</Glass>
<View pointerEvents="none" className="min-h-11 items-center justify-center">
<Badge variant={meta.variant} icon={meta.icon}>
{meta.label}
</Badge>
</View>
</View>
<View pointerEvents="none" className="absolute inset-0 items-center justify-center">
<View className="h-11 flex-row items-center justify-center gap-2 rounded-full pl-3.5 pr-5">
<Glass effect="regular" className="absolute inset-0 rounded-full" />
<LumioMark size={18} />
<Text accessibilityRole="header" className="text-sm font-bold tracking-tight">
{order.id}
</Text>
</View>
</View>
</View>
<ScrollView
className="flex-1"
showsVerticalScrollIndicator={false}
contentContainerClassName="gap-4 px-6"
contentContainerStyle={{ paddingTop: insets.top + 60, paddingBottom: insets.bottom + 24 }}
>
{/* Status card — step bar for live orders, a line of state for done. */}
<Mount>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Content className="gap-4 p-5">
{active ? (
<>
<View>
<Text variant="small" className="font-semibold">
{order.eta ?? meta.label}
</Text>
<Text variant="muted" className="text-xs">
Standard delivery
</Text>
</View>
<Steps
steps={STAGES}
current={STATUS_STAGE[order.status]}
variant="dots"
labels
interactive={false}
haptic={false}
accessibilityLabel={`Order status: ${meta.label}`}
/>
{onTrack ? (
<Button
tone="inverse"
className="bg-[#1B1B26]"
icon={<Icon name="package" size="sm" color="#FFFFFF" />}
onPress={() => {
haptics.light();
onTrack(order);
}}
accessibilityLabel={`Track order ${order.id}`}
>
Track package
</Button>
) : null}
{/* Reorder shortcut — the highest-value action on a past order. */}
{order.status === "delivered" ? (
<Button
variant="secondary"
icon={<Icon name="refresh" size="sm" color="foreground" />}
haptic="light"
accessibilityLabel={`Reorder ${order.id}`}
>
Buy again
</Button>
) : null}
</>
) : (
<View className="flex-row items-center gap-2">
<Icon name={meta.icon} size="sm" color="mutedForeground" />
<Text variant="small">
{order.status === "delivered"
? `Delivered ${order.date}`
: "Cancelled — refund issued to original payment method"}
</Text>
</View>
)}
</Card.Content>
</Card>
</Mount>
{/* Items */}
<Mount delay={BLOCK_STAGGER}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Items</Card.Title>
<Card.Description>
{itemCount} {itemCount === 1 ? "item" : "items"}
</Card.Description>
</Card.Header>
<Card.Content className="gap-4 pb-4">
{order.items.map((item, i) => (
<View key={`${item.name}-${i}`} className="flex-row gap-3">
<Image
source={item.imageUrl ? { uri: item.imageUrl } : undefined}
rounded="xl"
aspectRatio={4 / 5}
className="w-14"
accessibilityLabel={`Photo of ${item.name}`}
/>
<View className="flex-1">
<Text variant="small" numberOfLines={1}>
{item.name}
</Text>
{item.variantLabel ? (
<Text variant="muted" className="text-xs">
{item.variantLabel}
</Text>
) : null}
<Text variant="muted" className="text-xs tabular-nums">
Qty {item.quantity}
</Text>
</View>
<Text variant="small" className="font-semibold tabular-nums">
{fmt(item.price * item.quantity, currency)}
</Text>
</View>
))}
</Card.Content>
</Card>
</Mount>
{/* Delivery address */}
<Mount delay={BLOCK_STAGGER * 2}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Delivery address</Card.Title>
</Card.Header>
<Card.Content className="pb-4">
<View className="flex-row gap-3">
<View
className="h-10 w-10 items-center justify-center rounded-full bg-[#EDF8C4] dark:bg-[#1E2410]"
accessibilityElementsHidden
importantForAccessibility="no"
>
<Icon name="map-pin" size="sm" color="#65A30D" />
</View>
<View className="flex-1 gap-0.5">
<Text variant="small">{order.address.name}</Text>
<Text variant="muted">
{order.address.line1}
{order.address.line2 ? `, ${order.address.line2}` : ""}
</Text>
<Text variant="muted">
{order.address.city} {order.address.postalCode}
</Text>
</View>
</View>
</Card.Content>
</Card>
</Mount>
{/* Payment + summary — one card pair, the receipt bottom-half. */}
<Mount delay={BLOCK_STAGGER * 3}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Payment</Card.Title>
</Card.Header>
<Card.Content className="gap-3 pb-4">
<View className="flex-row items-center gap-3">
<View
className="h-9 w-14 items-center justify-center rounded-md bg-muted"
accessibilityElementsHidden
importantForAccessibility="no"
>
<Text className="text-xs font-bold uppercase tracking-wider text-foreground">
{order.payment.brand}
</Text>
</View>
<Text variant="small" className="flex-1 tabular-nums">
•••• {order.payment.last4}
</Text>
<Text variant="small" className="font-semibold tabular-nums">
{fmt(order.total, currency)}
</Text>
</View>
<Separator />
<SummaryRow label="Subtotal" value={fmt(order.subtotal, currency)} />
<SummaryRow
label="Shipping"
value={order.shipping === 0 ? "Free" : fmt(order.shipping, currency)}
/>
{order.tax != null ? (
<SummaryRow label="Tax" value={fmt(order.tax, currency)} />
) : null}
<Separator className="my-1" />
<SummaryRow label="Total" value={fmt(order.total, currency)} bold />
</Card.Content>
</Card>
</Mount>
{/* Secondary actions — help is a row, cancel only while cancellable. */}
<Mount delay={BLOCK_STAGGER * 4} className="gap-1">
{onReorder && !active ? (
<Button
variant="secondary"
icon={<Icon name="repeat" size="sm" color="foreground" />}
onPress={() => {
haptics.light();
onReorder(order);
}}
accessibilityLabel={`Reorder items from order ${order.id}`}
>
Buy again
</Button>
) : null}
{onHelp ? (
<Button
variant="secondary"
icon={<Icon name="question-circle" size="sm" color="foreground" />}
onPress={() => {
haptics.light();
onHelp(order);
}}
accessibilityLabel={`Get help with order ${order.id}`}
>
Need help with this order?
</Button>
) : null}
{onCancelOrder && order.status === "processing" ? (
<Pressable
onPress={() => {
haptics.warning();
onCancelOrder(order);
}}
accessibilityRole="button"
accessibilityLabel={`Cancel order ${order.id}`}
hitSlop={8}
className="min-h-11 items-center justify-center"
>
<Text variant="small" className="font-medium text-destructive">
Cancel order
</Text>
</Pressable>
) : null}
</Mount>
</ScrollView>
</SafeAreaView>
</World>
);
}
OrderDetailScreen.displayName = "OrderDetailScreen";
Recreate the "Order Detail Screen" screen in React Native using LumioUI.
Goal: Status badge and step bar over line-item thumbnails, delivery address, payment tile, and receipt summary — with track, buy-again, and cancel actions Match the reference implementation's layout, behavior, and motion exactly — this is a production screen, not a mockup.
## Setup
Fastest path — install the screen plus its component deps:
```bash
npx lumioui add ecommerce-order-detail
```
Or pull just the components: `npx lumioui add badge button card icon image separator steps text`
Native packages:
- @lumioui/ui@latest
- @lumioui/core@latest
- react-native-safe-area-context@*
- react-native-reanimated@*
- react-native-svg@*
- nativewind@*
Stack assumptions: Expo SDK 54 / RN 0.81, Reanimated 4, NativeWind v4, TypeScript strict, Expo Go compatible.
## Components — how, where, when
### `badge` — Compact status pill with variants, icons and pulse option.
- `<Badge>` ×1
### `button` — Tactile pill button with press spring, ink wash and async loading.
- `<Button>` ×4
### `card` — Compound surface — header, title, content and footer slots.
- `<Card>` ×4
### `icon` — Lucide icon set mapped to theme colors and sizes.
- `<Icon>` ×7
### `image` — Cached image with placeholder, fallback and aspect handling.
- `<Image>` ×1
### `separator` — Hairline rule with orientation and spacing control.
- `<Separator>` ×2
### `steps` — Horizontal step indicator with numbered or dot markers, check-on-complete pop, and connectors that fill as progress advances
- `<Steps>` ×1
### `text` — Themed type scale from caption to display.
- `<Text>` ×17
## Conventions (non-negotiable)
- Styling via NativeWind `className` with semantic tokens only: `bg-background`, `text-foreground`, `bg-card`, `text-card-foreground`, `bg-secondary`, `bg-muted`, `text-muted-foreground`, `bg-accent`, `bg-destructive`, `border-border`. Hard-coded colors only inside media overlays (`text-white`, `bg-black/N`).
- Motion via the token presets from `@lumioui/core` (`spring.press`, `spring.surface`, `spring.glide`, `timing.fast`, `timing.slow`, …) — no bespoke spring configs or durations.
- Gate transform motion behind `useReducedMotion()`; keep opacity/color feedback, drop travel and overshoot.
- Haptics via `useHaptic()`: `light` on press, `selection` on toggle/select, `warning` on invalid input. Never import expo-haptics directly.
- Press feedback via `usePressAnimation()` (~0.97 scale), not `activeOpacity` tricks.
- a11y: `accessibilityRole` + `accessibilityLabel` on every control, touch targets ≥44pt.
- Entrance choreography: staggered `Mount` wrappers (delay 0/60/120…) so regions land in sequence instead of popping in at once.
- Wrap the screen in `SafeAreaView`; keep dark mode working via the semantic tokens.
## Deliverable
One file: `screens/ecommerce/order-detail.tsx` exporting OrderDetailScreen. Preserve the props interface — the host app wires the callbacks (navigation, submit handlers) through them.
## Reference implementation
The LumioUI source for this screen — reproduce it faithfully:
```tsx
import * as React from "react";
import { View, ScrollView, Pressable } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Badge, Button, Card, Glass, Icon, Image, Separator, Steps, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { BLOCK_STAGGER, catalogImg, LumioMark, Mount, Press, World } from "../shared";
export type OrderDetailStatus = "processing" | "in-transit" | "delivered" | "cancelled";
export interface OrderLineItem {
name: string;
/** "Camel · M" */
variantLabel?: string;
quantity: number;
price: number;
imageUrl?: string;
}
export interface OrderDetail {
id: string;
date: string;
status: OrderDetailStatus;
/** "Arrives Fri, Sep 18" — active orders only. */
eta?: string;
items: OrderLineItem[];
address: {
name: string;
line1: string;
line2?: string;
city: string;
postalCode: string;
};
payment: { brand: string; last4: string };
subtotal: number;
shipping: number;
tax?: number;
total: number;
}
export interface OrderDetailScreenProps {
order?: OrderDetail;
currency?: string;
onTrack?: (order: OrderDetail) => void;
onReorder?: (order: OrderDetail) => void;
/** Only rendered while the order is still cancellable (processing). */
onCancelOrder?: (order: OrderDetail) => void;
onHelp?: (order: OrderDetail) => void;
onBack?: () => void;
}
const img = (p: Parameters<typeof catalogImg>[0]) => catalogImg(p, 160, 200);
// Same parcel as orders.tsx/tracking.tsx: HL-2094, confirmed Sep 15,
// arriving Sep 18 — overcoat $248 + 2× garment-dyed tee $210
// + 2× heritage tee $170 = $628, free shipping.
const DEFAULT_ORDER: OrderDetail = {
id: "HL-2094",
date: "Sep 15, 2026",
status: "in-transit",
eta: "Arrives Fri, Sep 18",
items: [
{ name: "Structured Wool Overcoat", variantLabel: "Camel · M", quantity: 1, price: 248, imageUrl: img("overcoat") },
{ name: "Garment-Dyed Tee", variantLabel: "Sage · S", quantity: 2, price: 105, imageUrl: img("tee") },
{ name: "Heritage Graphic Tee", variantLabel: "Indigo · M", quantity: 2, price: 85, imageUrl: img("graphicTee") },
],
address: {
name: "Amara Chen",
line1: "421 Harbor Lane",
line2: "Apt 5B",
city: "San Francisco, CA",
postalCode: "94107",
},
payment: { brand: "Visa", last4: "4821" },
subtotal: 628,
shipping: 0,
total: 628,
};
const STAGES = ["Ordered", "Shipped", "Out for delivery", "Delivered"];
const STATUS_STAGE: Record<OrderDetailStatus, number> = {
processing: 0,
"in-transit": 2,
delivered: 3,
cancelled: 0,
};
const STATUS_META: Record<
OrderDetailStatus,
{ label: string; variant: "warning" | "info" | "success" | "destructive"; icon: "clock" | "truck" | "check" | "x" }
> = {
processing: { label: "Processing", variant: "warning", icon: "clock" },
"in-transit": { label: "In transit", variant: "info", icon: "truck" },
delivered: { label: "Delivered", variant: "success", icon: "check" },
cancelled: { label: "Cancelled", variant: "destructive", icon: "x" },
};
const fmt = (n: number, currency = "$") =>
`${currency}${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
function SummaryRow({
label,
value,
bold,
}: {
label: string;
value: string;
bold?: boolean;
}) {
return (
<View className="flex-row items-center justify-between py-1">
<Text variant={bold ? "large" : "muted"}>{label}</Text>
<Text variant={bold ? "large" : "small"} className="tabular-nums">
{value}
</Text>
</View>
);
}
/** Order detail — status + step bar, line items with thumbnails, delivery
* address, payment, summary, and contextual track/cancel/help actions. */
export function OrderDetailScreen({
order = DEFAULT_ORDER,
currency = "$",
onTrack,
onReorder,
onCancelOrder,
onHelp,
onBack,
}: OrderDetailScreenProps) {
const haptics = useHaptic();
const insets = useSafeAreaInsets();
const meta = STATUS_META[order.status];
const active = order.status === "in-transit" || order.status === "processing";
const itemCount = order.items.reduce((s, i) => s + i.quantity, 0);
return (
<World primary="#65A30D">
<SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
{/* Floating chrome — back disc + centered order pill + status badge. */}
<View pointerEvents="box-none" className="absolute inset-x-4 z-10" style={{ top: insets.top + 8 }}>
<View className="flex-row items-center justify-between">
<Glass interactive effect="regular" className="h-11 w-11 items-center justify-center rounded-full">
<Press
haptic="light"
onPress={() => onBack?.()}
accessibilityRole="button"
accessibilityLabel="Go back"
className="h-9 w-9 items-center justify-center"
>
<Icon name="chevron-left" size="md" color="foreground" />
</Press>
</Glass>
<View pointerEvents="none" className="min-h-11 items-center justify-center">
<Badge variant={meta.variant} icon={meta.icon}>
{meta.label}
</Badge>
</View>
</View>
<View pointerEvents="none" className="absolute inset-0 items-center justify-center">
<View className="h-11 flex-row items-center justify-center gap-2 rounded-full pl-3.5 pr-5">
<Glass effect="regular" className="absolute inset-0 rounded-full" />
<LumioMark size={18} />
<Text accessibilityRole="header" className="text-sm font-bold tracking-tight">
{order.id}
</Text>
</View>
</View>
</View>
<ScrollView
className="flex-1"
showsVerticalScrollIndicator={false}
contentContainerClassName="gap-4 px-6"
contentContainerStyle={{ paddingTop: insets.top + 60, paddingBottom: insets.bottom + 24 }}
>
{/* Status card — step bar for live orders, a line of state for done. */}
<Mount>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Content className="gap-4 p-5">
{active ? (
<>
<View>
<Text variant="small" className="font-semibold">
{order.eta ?? meta.label}
</Text>
<Text variant="muted" className="text-xs">
Standard delivery
</Text>
</View>
<Steps
steps={STAGES}
current={STATUS_STAGE[order.status]}
variant="dots"
labels
interactive={false}
haptic={false}
accessibilityLabel={`Order status: ${meta.label}`}
/>
{onTrack ? (
<Button
tone="inverse"
className="bg-[#1B1B26]"
icon={<Icon name="package" size="sm" color="#FFFFFF" />}
onPress={() => {
haptics.light();
onTrack(order);
}}
accessibilityLabel={`Track order ${order.id}`}
>
Track package
</Button>
) : null}
{/* Reorder shortcut — the highest-value action on a past order. */}
{order.status === "delivered" ? (
<Button
variant="secondary"
icon={<Icon name="refresh" size="sm" color="foreground" />}
haptic="light"
accessibilityLabel={`Reorder ${order.id}`}
>
Buy again
</Button>
) : null}
</>
) : (
<View className="flex-row items-center gap-2">
<Icon name={meta.icon} size="sm" color="mutedForeground" />
<Text variant="small">
{order.status === "delivered"
? `Delivered ${order.date}`
: "Cancelled — refund issued to original payment method"}
</Text>
</View>
)}
</Card.Content>
</Card>
</Mount>
{/* Items */}
<Mount delay={BLOCK_STAGGER}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Items</Card.Title>
<Card.Description>
{itemCount} {itemCount === 1 ? "item" : "items"}
</Card.Description>
</Card.Header>
<Card.Content className="gap-4 pb-4">
{order.items.map((item, i) => (
<View key={`${item.name}-${i}`} className="flex-row gap-3">
<Image
source={item.imageUrl ? { uri: item.imageUrl } : undefined}
rounded="xl"
aspectRatio={4 / 5}
className="w-14"
accessibilityLabel={`Photo of ${item.name}`}
/>
<View className="flex-1">
<Text variant="small" numberOfLines={1}>
{item.name}
</Text>
{item.variantLabel ? (
<Text variant="muted" className="text-xs">
{item.variantLabel}
</Text>
) : null}
<Text variant="muted" className="text-xs tabular-nums">
Qty {item.quantity}
</Text>
</View>
<Text variant="small" className="font-semibold tabular-nums">
{fmt(item.price * item.quantity, currency)}
</Text>
</View>
))}
</Card.Content>
</Card>
</Mount>
{/* Delivery address */}
<Mount delay={BLOCK_STAGGER * 2}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Delivery address</Card.Title>
</Card.Header>
<Card.Content className="pb-4">
<View className="flex-row gap-3">
<View
className="h-10 w-10 items-center justify-center rounded-full bg-[#EDF8C4] dark:bg-[#1E2410]"
accessibilityElementsHidden
importantForAccessibility="no"
>
<Icon name="map-pin" size="sm" color="#65A30D" />
</View>
<View className="flex-1 gap-0.5">
<Text variant="small">{order.address.name}</Text>
<Text variant="muted">
{order.address.line1}
{order.address.line2 ? `, ${order.address.line2}` : ""}
</Text>
<Text variant="muted">
{order.address.city} {order.address.postalCode}
</Text>
</View>
</View>
</Card.Content>
</Card>
</Mount>
{/* Payment + summary — one card pair, the receipt bottom-half. */}
<Mount delay={BLOCK_STAGGER * 3}>
<Card variant="elevated" className="rounded-3xl bg-white dark:bg-[#1A1A20]">
<Card.Header>
<Card.Title>Payment</Card.Title>
</Card.Header>
<Card.Content className="gap-3 pb-4">
<View className="flex-row items-center gap-3">
<View
className="h-9 w-14 items-center justify-center rounded-md bg-muted"
accessibilityElementsHidden
importantForAccessibility="no"
>
<Text className="text-xs font-bold uppercase tracking-wider text-foreground">
{order.payment.brand}
</Text>
</View>
<Text variant="small" className="flex-1 tabular-nums">
•••• {order.payment.last4}
</Text>
<Text variant="small" className="font-semibold tabular-nums">
{fmt(order.total, currency)}
</Text>
</View>
<Separator />
<SummaryRow label="Subtotal" value={fmt(order.subtotal, currency)} />
<SummaryRow
label="Shipping"
value={order.shipping === 0 ? "Free" : fmt(order.shipping, currency)}
/>
{order.tax != null ? (
<SummaryRow label="Tax" value={fmt(order.tax, currency)} />
) : null}
<Separator className="my-1" />
<SummaryRow label="Total" value={fmt(order.total, currency)} bold />
</Card.Content>
</Card>
</Mount>
{/* Secondary actions — help is a row, cancel only while cancellable. */}
<Mount delay={BLOCK_STAGGER * 4} className="gap-1">
{onReorder && !active ? (
<Button
variant="secondary"
icon={<Icon name="repeat" size="sm" color="foreground" />}
onPress={() => {
haptics.light();
onReorder(order);
}}
accessibilityLabel={`Reorder items from order ${order.id}`}
>
Buy again
</Button>
) : null}
{onHelp ? (
<Button
variant="secondary"
icon={<Icon name="question-circle" size="sm" color="foreground" />}
onPress={() => {
haptics.light();
onHelp(order);
}}
accessibilityLabel={`Get help with order ${order.id}`}
>
Need help with this order?
</Button>
) : null}
{onCancelOrder && order.status === "processing" ? (
<Pressable
onPress={() => {
haptics.warning();
onCancelOrder(order);
}}
accessibilityRole="button"
accessibilityLabel={`Cancel order ${order.id}`}
hitSlop={8}
className="min-h-11 items-center justify-center"
>
<Text variant="small" className="font-medium text-destructive">
Cancel order
</Text>
</Pressable>
) : null}
</Mount>
</ScrollView>
</SafeAreaView>
</World>
);
}
OrderDetailScreen.displayName = "OrderDetailScreen";
```
Screen: https://lumioui.dev/screens/ecommerce-order-detail