@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
56 lines (55 loc) • 1.78 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue2 = require("@dialpad/dialtone-icons/vue2");
const notice_constants = require("./notice_constants.cjs");
const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
const kindToIcon = /* @__PURE__ */ new Map([
["info", vue2.DtIconInfo],
["success", vue2.DtIconCheckCircle],
["warning", vue2.DtIconAlertTriangle],
["error", vue2.DtIconAlertCircle],
["base", vue2.DtIconBell]
]);
const _sfc_main = {
name: "DtNoticeIcon",
components: {
DtIconInfo: vue2.DtIconInfo,
DtIconCheckCircle: vue2.DtIconCheckCircle,
DtIconAlertTriangle: vue2.DtIconAlertTriangle,
DtIconAlertCircle: vue2.DtIconAlertCircle,
DtIconBell: vue2.DtIconBell
},
props: {
/**
* Kind of icon
* @values base, error, info, success, warning
*/
kind: {
type: String,
default: "base",
validate(kind) {
return notice_constants.NOTICE_KINDS.includes(kind);
}
}
},
computed: {
defaultIcon() {
return kindToIcon.get(this.kind);
}
}
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _vm.defaultIcon || _vm.$slots.default ? _c("div", { staticClass: "d-notice__icon", attrs: { "aria-hidden": "true" } }, [_vm._t("default", function() {
return [_c(_vm.defaultIcon, { tag: "component", attrs: { "size": "400" } })];
})], 2) : _vm._e();
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const DtNoticeIcon = __component__.exports;
exports.default = DtNoticeIcon;
//# sourceMappingURL=notice_icon.vue.cjs.map