diff --git a/apps/mesh/src/web/components/sandbox/preview/path-param-picker-chip.tsx b/apps/mesh/src/web/components/sandbox/preview/path-param-picker-chip.tsx index 41eca087db..6690410dec 100644 --- a/apps/mesh/src/web/components/sandbox/preview/path-param-picker-chip.tsx +++ b/apps/mesh/src/web/components/sandbox/preview/path-param-picker-chip.tsx @@ -1,6 +1,7 @@ import { useRef, useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { ArrowRight, SearchSm } from "@untitledui/icons"; +import { cn } from "@deco/ui/lib/utils.js"; import { Command, CommandEmpty, @@ -34,6 +35,9 @@ import { const PICKER_FETCH_TIMEOUT_MS = 10_000; +const PARAM_LABEL_BADGE = + "rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 dark:text-violet-400"; + const KIND_LABELS: Record = { product: { noun: "product", heading: "Products" }, category: { noun: "category", heading: "Categories" }, @@ -267,7 +271,10 @@ export function PathParamPickerChip({ title={t("sandbox.pathParamPickerChip.buttonTitle", { paramLabel, })} - className="max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400" + className={cn( + PARAM_LABEL_BADGE, + "max-w-64 shrink-0 cursor-pointer truncate hover:bg-violet-500/25", + )} onClick={(e) => { e.stopPropagation(); handleOpenChange(true); @@ -294,7 +301,7 @@ export function PathParamPickerChip({ {t("sandbox.pathParamPickerChip.pickValueHeading")}{" "} - + {paramLabel}