UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

70 lines (69 loc) 2.17 kB
import { hasSlotContent } from "../../common/utils.js"; import { openBlock, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue"; import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js"; 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 }; } }; 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 openBlock(), createElementBlock("div", _hoisted_1, [ $props.title || $data.hasSlotContent(_ctx.$slots.titleOverride) ? (openBlock(), createElementBlock("p", { key: 0, id: $props.titleId, class: "d-notice__title", "data-qa": "notice-content-title" }, [ renderSlot(_ctx.$slots, "titleOverride", {}, () => [ createTextVNode(toDisplayString($props.title), 1) ]) ], 8, _hoisted_2)) : createCommentVNode("", true), createElementVNode("p", { id: $props.contentId, class: "d-notice__message", "data-qa": "notice-content-message" }, [ renderSlot(_ctx.$slots, "default") ], 8, _hoisted_3) ]); } const DtNoticeContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { DtNoticeContent as default }; //# sourceMappingURL=notice_content.vue.js.map