1 import { clx } from "@medusajs/ui"
2 import { PropsWithChildren } from "react"
3
4 type StatusCellProps = PropsWithChildren<{
5 color?: "green" | "red" | "blue" | "orange" | "grey" | "purple"
6 }>
7
8 /**
9 * @deprecated Use the new DataTable and DataTableStatusCell instead
10 */
11 export const StatusCell = ({ color, children }: StatusCellProps) => {
12 return (
13 <div className="txt-compact-small text-ui-fg-subtle flex h-full w-full items-center gap-x-2 overflow-hidden">
14 <div
15 role="presentation"
16 className="flex h-5 w-2 items-center justify-center"
17 >
18 <div
19 className={clx(
20 "h-2 w-2 rounded-sm shadow-[0px_0px_0px_1px_rgba(0,0,0,0.12)_inset]",
21 {
22 "bg-ui-tag-neutral-icon": color === "grey",
23 "bg-ui-tag-green-icon": color === "green",
24 "bg-ui-tag-red-icon": color === "red",
25 "bg-ui-tag-blue-icon": color === "blue",
26 "bg-ui-tag-orange-icon": color === "orange",
27 "bg-ui-tag-purple-icon": color === "purple",
28 }
29 )}
30 />
31 </div>
32 <span className="truncate">{children}</span>
33 </div>
34 )
35 }