@flanksource/clicky-ui
Version:
Flanksource Clicky UI — React component library built on shadcn/ui with light/dark and density theming.
19 lines (18 loc) • 570 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { Badge } from "./Badge.js";
import { cn } from "../lib/utils.js";
const METHOD_TONES = {
get: "info",
post: "success",
put: "warning",
patch: "warning",
delete: "danger"
};
function MethodBadge({ method, className }) {
const tone = METHOD_TONES[method.toLowerCase()] ?? "neutral";
return /* @__PURE__ */ jsx(Badge, { variant: "outline", tone, size: "sm", className: cn("font-mono uppercase", className), children: method.toUpperCase() });
}
export {
MethodBadge
};
//# sourceMappingURL=MethodBadge.js.map