Files
mrp/client/src/modules/shipping/ShipmentStatusBadge.tsx

9 lines
462 B
TypeScript
Raw Normal View History

2026-03-14 23:48:27 -05:00
import type { ShipmentStatus } from "@mrp/shared/dist/shipping/types.js";
import { shipmentStatusOptions, shipmentStatusPalette } from "./config";
export function ShipmentStatusBadge({ status }: { status: ShipmentStatus }) {
const label = shipmentStatusOptions.find((option) => option.value === status)?.label ?? status;
return <span className={`inline-flex rounded-full px-2 py-1 text-xs font-semibold ${shipmentStatusPalette[status]}`}>{label}</span>;
}