@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
70 lines (69 loc) • 2.28 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const common_utils = require("../../common/utils.cjs");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
const _sfc_main = {
compatConfig: { MODE: 3 },
name: "DtNoticeContent",
props: {
/**
* Title header of the notice. This can be left blank to remove the title from the notice entirely.
*/
title: {
type: String,
default: ""
},
/**
* ID for the title element of the component. Useful for aria-describedby
* or aria-labelledby or any other reason you may need an id to refer to the title.
*/
titleId: {
type: String,
default: void 0
},
/**
* ID for the content element of the component. Useful for aria-describedby
* or aria-labelledby or any other reason you may need an id to refer to the content.
*/
contentId: {
type: String,
default: void 0
}
},
data() {
return {
hasSlotContent: common_utils.hasSlotContent
};
}
};
const _hoisted_1 = {
class: "d-notice__content",
"data-qa": "notice-content"
};
const _hoisted_2 = ["id"];
const _hoisted_3 = ["id"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
$props.title || $data.hasSlotContent(_ctx.$slots.titleOverride) ? (vue.openBlock(), vue.createElementBlock("p", {
key: 0,
id: $props.titleId,
class: "d-notice__title",
"data-qa": "notice-content-title"
}, [
vue.renderSlot(_ctx.$slots, "titleOverride", {}, () => [
vue.createTextVNode(vue.toDisplayString($props.title), 1)
])
], 8, _hoisted_2)) : vue.createCommentVNode("", true),
vue.createElementVNode("p", {
id: $props.contentId,
class: "d-notice__message",
"data-qa": "notice-content-message"
}, [
vue.renderSlot(_ctx.$slots, "default")
], 8, _hoisted_3)
]);
}
const DtNoticeContent = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
exports.default = DtNoticeContent;
//# sourceMappingURL=notice_content.vue.cjs.map