@frontify/fondue
Version:
Design system of Frontify
25 lines (24 loc) • 928 B
JavaScript
import { jsx as t } from "react/jsx-runtime";
import { getColorDisplayValue as i } from "../../utilities/colors.es.js";
import { merge as l } from "../../utilities/merge.es.js";
import { isBadgeStatus as o, badgeStatusClasses as n } from "./helpers.es.js";
import { ColorFormat as d } from "../../types/colors.es.js";
const m = ({ status: e, disabled: a, "data-test-id": r = "badge" }) => /* @__PURE__ */ t("div", { className: "tw-flex-none tw-inline-flex tw-justify-center tw-items-center ", children: /* @__PURE__ */ t(
"span",
{
"data-test-id": `${r}-status`,
className: l([
"tw-w-2 tw-h-2 tw-rounded-full tw-flex-none",
a && "tw-opacity-30",
o(e) && n[e]
]),
style: o(e) ? {} : {
backgroundColor: typeof e == "string" ? e : i(e, d.Rgba, !0)
}
}
) });
m.displayName = "FondueBadgeStatusIcon";
export {
m as BadgeStatusIcon
};
//# sourceMappingURL=BadgeStatusIcon.es.js.map