UNPKG

@lunalytics/ui

Version:

React based component library created to be used in Lunalytics

42 lines (41 loc) 1.48 kB
import { jsxs as c, jsx as r } from "react/jsx-runtime"; import { c as u } from "../../index-2w0W-O47.js"; import { G as v } from "../../iconBase-DSKTHwal.js"; import '../../assets/alert.css';function e(n) { return v({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }, child: [] }] })(n); } const p = { info: "blue", success: "green", warning: "yellow", error: "red" }, i = { info: () => /* @__PURE__ */ r(e, {}), success: () => /* @__PURE__ */ r(e, {}), warning: () => /* @__PURE__ */ r(e, {}), error: () => /* @__PURE__ */ r(e, {}) }, g = ({ title: n = "info", hideIcon: d = !1, description: l, color: o, variant: a = "border", status: s = "info", ...h }) => { const t = o || p[s], m = s ? i[s] : i.info, f = u("luna-alert", { [t]: t, [a]: a }); return /* @__PURE__ */ c("div", { className: f, ...h, children: [ !d && /* @__PURE__ */ r("div", { className: "luna-alert-icon", children: /* @__PURE__ */ r(m, {}) }), /* @__PURE__ */ c("div", { children: [ /* @__PURE__ */ r("div", { className: "luna-alert-title", children: n }), l && /* @__PURE__ */ r("div", { children: l }) ] }) ] }); }; g.displayName = "Alert"; export { g as default };