@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
53 lines (52 loc) • 1.59 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue2 = require("@dialpad/dialtone-icons/vue2");
const icon_constants = require("./icon_constants.cjs");
const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
const _sfc_main = {
name: "DtIcon",
props: {
/**
* The size of the icon.
* @values 100, 200, 300, 400, 500, 600, 700, 800
*/
size: {
type: String,
default: "500",
validator: (s) => Object.keys(icon_constants.ICON_SIZE_MODIFIERS).includes(s)
},
/**
* The icon name in kebab-case
*/
name: {
type: String,
required: true,
validator: (name) => icon_constants.ICON_NAMES.includes(name)
},
/**
* The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational
*/
ariaLabel: {
type: String,
default: void 0
}
},
computed: {
icon() {
return vue2.icons[`./src/icons/${this.name}.vue`];
}
}
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _vm.icon ? _c(_vm.icon, { tag: "component", attrs: { "size": _vm.size, "aria-label": _vm.ariaLabel, "data-qa": _vm.$attrs["data-qa"] ?? "dt-icon" } }) : _vm._e();
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const icon = __component__.exports;
exports.default = icon;
//# sourceMappingURL=icon.vue.cjs.map