@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
48 lines (47 loc) • 1.44 kB
JavaScript
import { hasSlotContent as e } from "../../common/utils/index.js";
import { t } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import { NOTICE_KINDS as n } from "./notice-constants.js";
import { createBlock as r, createCommentVNode as i, createElementBlock as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c } from "vue";
import { DtIconAlertCircle as l, DtIconAlertTriangle as u, DtIconBell as d, DtIconCheckCircle as f, DtIconInfo as p } from "@dialpad/dialtone-icons/vue3";
//#region components/notice/notice_icon.vue
var m = new Map([
["info", p],
["success", f],
["warning", u],
["error", l],
["base", d]
]), h = {
compatConfig: { MODE: 3 },
name: "DtNoticeIcon",
components: {
DtIconInfo: p,
DtIconCheckCircle: f,
DtIconAlertTriangle: u,
DtIconAlertCircle: l,
DtIconBell: d
},
props: { kind: {
type: String,
default: "base",
validate(e) {
return n.includes(e);
}
} },
data() {
return { hasSlotContent: e };
},
computed: { defaultIcon() {
return m.get(this.kind);
} }
}, g = {
key: 0,
"aria-hidden": "true",
class: "d-notice__icon"
};
function _(e, t, n, l, u, d) {
return d.defaultIcon || u.hasSlotContent(e.$slots.default) ? (o(), a("div", g, [s(e.$slots, "default", {}, () => [(o(), r(c(d.defaultIcon), { size: "400" }))])])) : i("", !0);
}
var v = /* @__PURE__ */ t(h, [["render", _]]);
//#endregion
export { v as default };
//# sourceMappingURL=notice-icon.js.map