UNPKG

@achs/webkit

Version:

Conjunto de componentes de UI con el estilo del Sistema de Diseño ACHS (Asociación Chilena de Seguridad), para reutilizar de forma transversal en las aplicaciones web de ACHS. Construido con **React 19**, **TypeScript** y **Vite**, con soporte para las

48 lines (47 loc) 1.46 kB
import { jsxs as s, jsx as a } from "react/jsx-runtime"; import { forwardRef as u } from "react"; import i from "./StatusBar.module.scss.mjs"; import '../../../assets/node_modules/.pnpm/bootstrap-icons@1.13.1/node_modules/bootstrap-icons/font/bootstrap-icons.css';/* empty css */ const p = { success: "bi-check-circle-fill", warning: "bi-exclamation-triangle-fill", error: "bi-x-circle-fill", info: "bi-info-circle-fill", neutral: "bi-circle-fill" }, N = u(({ status: r, label: c, description: l, iconName: t, showIcon: n = !0, variant: o = "subtle", action: e, className: d, ...m }, f) => { const b = t ?? p[r]; return /* @__PURE__ */ s( "div", { ref: f, className: `${i.bar} ${d ?? ""}`.trim(), "data-status": r, "data-variant": o, role: "status", ...m, children: [ n && /* @__PURE__ */ a("i", { className: `bi ${b} ${i.icon}`, "aria-hidden": "true" }), /* @__PURE__ */ s("div", { className: i.body, children: [ /* @__PURE__ */ a("span", { className: i.label, children: c }), l && /* @__PURE__ */ a("span", { className: i.description, children: l }) ] }), e && /* @__PURE__ */ a("div", { className: i.action, children: e }) ] } ); }); N.displayName = "StatusBar"; export { N as StatusBar, N as default };