@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
53 lines (52 loc) • 1.19 kB
JavaScript
import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import { ICON_NAMES as t, ICON_SIZE_MODIFIERS as n } from "./icon-constants.js";
import { createBlock as r, createCommentVNode as i, openBlock as a, resolveDynamicComponent as o } from "vue";
import { icons as s } from "@dialpad/dialtone-icons/vue3";
//#region components/icon/icon.vue
var c = {
compatConfig: { MODE: 3 },
name: "DtIcon",
props: {
size: {
type: String,
default: "500",
validator: (e) => Object.keys(n).includes(e)
},
name: {
type: String,
required: !0,
validator: (e) => t.includes(e)
},
ariaLabel: {
type: String,
default: void 0
}
},
data() {
return {};
},
computed: {
icon() {
return s[`./src/icons/${this.name}.vue`];
},
iconAriaLabel() {
return this.ariaLabel;
}
}
};
function l(e, t, n, s, c, l) {
return l.icon ? (a(), r(o(l.icon), {
key: 0,
size: n.size,
"aria-label": l.iconAriaLabel,
"data-qa": e.$attrs["data-qa"] ?? "dt-icon"
}, null, 8, [
"size",
"aria-label",
"data-qa"
])) : i("", !0);
}
var u = /* @__PURE__ */ e(c, [["render", l]]);
//#endregion
export { u as default };
//# sourceMappingURL=icon.js.map