@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
93 lines (92 loc) • 2 kB
JavaScript
import { hasSlotContent as d } from "../../common/utils/index.js";
import { createElementBlock as r, openBlock as o, normalizeClass as a, createCommentVNode as l, createElementVNode as c, renderSlot as s, normalizeStyle as i } from "vue";
import { _ as f } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const m = {
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: d
};
}
};
function C(e, h, t, u, n, y) {
return o(), r("div", {
class: a([
"d-card",
t.containerClass
]),
"data-qa": "dt-card"
}, [
n.hasSlotContent(e.$slots.header) ? (o(), r("div", {
key: 0,
class: a([
"d-card__header",
t.headerClass
])
}, [
s(e.$slots, "header")
], 2)) : l("", !0),
c("div", {
class: a([
"d-card__content",
t.contentClass
]),
style: i({ "max-height": t.maxHeight })
}, [
s(e.$slots, "content")
], 6),
n.hasSlotContent(e.$slots.footer) ? (o(), r("div", {
key: 1,
class: a([
"d-card__footer",
t.footerClass
])
}, [
s(e.$slots, "footer")
], 2)) : l("", !0)
], 2);
}
const p = /* @__PURE__ */ f(m, [["render", C]]);
export {
p as default
};
//# sourceMappingURL=card.js.map