@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
37 lines (36 loc) • 1.06 kB
JavaScript
import { illustrations } from "@dialpad/dialtone-icons/vue2";
import { ILLUSTRATION_NAMES } from "./illustration_constants.js";
import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
const _sfc_main = {
name: "DtIllustration",
props: {
/**
* The illustration name in kebab-case
*/
name: {
type: String,
required: true,
validator: (name) => ILLUSTRATION_NAMES.includes(name)
}
},
computed: {
illustration() {
return illustrations[`./src/illustrations/${this.name}.vue`];
}
}
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _vm.illustration ? _c(_vm.illustration, { tag: "component", attrs: { "data-qa": _vm.$attrs["data-qa"] ?? "dt-illustration" } }) : _vm._e();
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ normalizeComponent(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const illustration = __component__.exports;
export {
illustration as default
};
//# sourceMappingURL=illustration.vue.js.map