@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
90 lines (89 loc) • 2.86 kB
JavaScript
import { hasSlotContent } from "../../../common/utils.js";
import { resolveComponent, openBlock, createElementBlock, createVNode, createSlots, withCtx, renderSlot, createCommentVNode } from "vue";
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
import DtChip from "../../../components/chip/chip.vue.js";
const _sfc_main = {
compatConfig: { MODE: 3 },
name: "DtRecipeGroupedChip",
components: {
DtChip
},
data() {
return {
hasSlotContent
};
}
};
const _hoisted_1 = {
"data-qa": "dt-recipe-grouped-chip",
class: "d-recipe-grouped-chip"
};
const _hoisted_2 = {
key: 0,
"data-qa": "left-grouped-chip-icon"
};
const _hoisted_3 = {
key: 0,
"data-qa": "left-grouped-chip-content"
};
const _hoisted_4 = {
key: 0,
"data-qa": "right-grouped-chip-icon"
};
const _hoisted_5 = {
key: 0,
"data-qa": "right-grouped-chip-content"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_dt_chip = resolveComponent("dt-chip");
return openBlock(), createElementBlock("div", _hoisted_1, [
createVNode(_component_dt_chip, {
"hide-close": true,
interactive: false,
size: "xs",
"grouped-chip": true,
class: "d-recipe-grouped-chip__content d-recipe-grouped-chip__content-left"
}, createSlots({
default: withCtx(() => [
$data.hasSlotContent(_ctx.$slots.leftContent) ? (openBlock(), createElementBlock("div", _hoisted_3, [
renderSlot(_ctx.$slots, "leftContent")
])) : createCommentVNode("", true)
]),
_: 2
}, [
$data.hasSlotContent(_ctx.$slots.leftIcon) ? {
name: "icon",
fn: withCtx(() => [
$data.hasSlotContent(_ctx.$slots.leftIcon) ? (openBlock(), createElementBlock("div", _hoisted_2, [
renderSlot(_ctx.$slots, "leftIcon")
])) : createCommentVNode("", true)
]),
key: "0"
} : void 0
]), 1024),
createVNode(_component_dt_chip, {
"hide-close": true,
interactive: false,
size: "xs",
"grouped-chip": true,
class: "d-recipe-grouped-chip__content d-recipe-grouped-chip__content-right"
}, {
icon: withCtx(() => [
$data.hasSlotContent(_ctx.$slots.rightIcon) ? (openBlock(), createElementBlock("div", _hoisted_4, [
renderSlot(_ctx.$slots, "rightIcon")
])) : createCommentVNode("", true)
]),
default: withCtx(() => [
$data.hasSlotContent(_ctx.$slots.rightContent) ? (openBlock(), createElementBlock("div", _hoisted_5, [
renderSlot(_ctx.$slots, "rightContent")
])) : createCommentVNode("", true)
]),
_: 3
})
]);
}
const grouped_chip = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
grouped_chip as default
};
//# sourceMappingURL=grouped_chip.vue.js.map