UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

93 lines (92 loc) 2.31 kB
import { hasSlotContent } from "../../common/utils.js"; import { openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, normalizeStyle } from "vue"; import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js"; const _sfc_main = { compatConfig: { MODE: 3 }, name: "DtCard", props: { /** * The maximum height of the card content. * If given, makes content area scrollable. */ maxHeight: { type: String, default: null }, /** * class for card container. */ containerClass: { type: [String, Array, Object], default: "" }, /** * class for card content. */ contentClass: { type: [String, Array, Object], default: "" }, /** * class for card header. */ headerClass: { type: [String, Array, Object], default: "" }, /** * class for card footer. */ footerClass: { type: [String, Array, Object], default: "" } }, data() { return { hasSlotContent }; } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { class: normalizeClass([ "d-card", $props.containerClass ]), "data-qa": "dt-card" }, [ $data.hasSlotContent(_ctx.$slots.header) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([ "d-card__header", $props.headerClass ]) }, [ renderSlot(_ctx.$slots, "header") ], 2)) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass([ "d-card__content", $props.contentClass ]), style: normalizeStyle({ "max-height": $props.maxHeight }) }, [ renderSlot(_ctx.$slots, "content") ], 6), $data.hasSlotContent(_ctx.$slots.footer) ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([ "d-card__footer", $props.footerClass ]) }, [ renderSlot(_ctx.$slots, "footer") ], 2)) : createCommentVNode("", true) ], 2); } const DtCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { DtCard as default }; //# sourceMappingURL=card.vue.js.map