UNPKG

@payfit/unity-components

Version:

38 lines (37 loc) • 1.28 kB
import { uyMerge as e, uyTv as t } from "@payfit/unity-themes"; import { jsx as n, jsxs as r } from "react/jsx-runtime"; import { Icon as i } from "@payfit/unity-icons"; //#region src/modules/ai-kit/components/ai-composer/parts/AIComposerAlert.tsx var a = t({ slots: { base: "uy:flex uy:items-start uy:gap-50", alertMessage: "uy:min-w-0 uy:whitespace-pre-wrap uy:typography-body-small-strong" }, variants: { variant: { warning: { alertMessage: "uy:text-content-warning-high" }, error: { alertMessage: "uy:text-content-danger" } } } }), o = ({ children: t, variant: o, className: s, ...c }) => { let { base: l, alertMessage: u } = a({ variant: o }), d = o === "error" ? "WarningCircleFilled" : "WarningFilled", f = o === "error" ? "content.danger" : "content.warning"; return /* @__PURE__ */ r("div", { ...c, role: o === "error" ? "alert" : "status", "aria-live": o === "error" ? "assertive" : "polite", className: e(l(), s), "data-unity-slot": "alert", "data-variant": o, children: [/* @__PURE__ */ n(i, { src: d, size: 20, color: f, "aria-hidden": "true", role: "presentation" }), /* @__PURE__ */ n("span", { className: u(), children: t })] }); }; o.displayName = "AIComposerAlert"; //#endregion export { o as AIComposerAlert };