@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
64 lines (63 loc) • 2.35 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const top_banner_info_constants = require("./top_banner_info_constants.cjs");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
const _sfc_main = {
compatConfig: { MODE: 3 },
name: "DtRecipeTopBannerInfo",
props: {
/**
* color of the banner background
*/
colorCode: {
type: String,
default: "green300",
validator: function(kind) {
return top_banner_info_constants.COLOR_CODES.includes(kind);
}
}
},
computed: {
bannerInfoClass() {
const bgColors = {
// these are too specific, so for now I'm at least updating the resultant semantic value
// TODO: breaking change: update to be more abstract
green100: "d-recipe-top-banner-info--success",
green300: "d-recipe-top-banner-info--success",
red100: "d-recipe-top-banner-info--critical",
red200: "d-recipe-top-banner-info--critical",
gold100: "d-recipe-top-banner-info--warning",
gold200: "d-recipe-top-banner-info--warning",
black100: "d-recipe-top-banner-info--info",
white: "d-recipe-top-banner-info--primary"
};
return [bgColors[this.colorCode]];
}
}
};
const _hoisted_1 = { class: "d-recipe-top-banner-info__left" };
const _hoisted_2 = {
class: "d-recipe-top-banner-info__middle",
"data-qa": "banner-info--middle"
};
const _hoisted_3 = { class: "d-recipe-top-banner-info__right" };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(["d-recipe-top-banner-info", $options.bannerInfoClass]),
"data-qa": "banner-info"
}, [
vue.createElementVNode("div", _hoisted_1, [
vue.renderSlot(_ctx.$slots, "left")
]),
vue.createElementVNode("div", _hoisted_2, [
vue.renderSlot(_ctx.$slots, "default")
]),
vue.createElementVNode("div", _hoisted_3, [
vue.renderSlot(_ctx.$slots, "right")
])
], 2);
}
const top_banner_info = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
exports.default = top_banner_info;
//# sourceMappingURL=top_banner_info.vue.cjs.map