shipping
This commit is contained in:
8
client/src/modules/shipping/ShipmentStatusBadge.tsx
Normal file
8
client/src/modules/shipping/ShipmentStatusBadge.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user