UNPKG

@vuesax-alpha/nightly

Version:
97 lines (94 loc) 3.22 kB
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, mergeProps, renderSlot, createCommentVNode } from 'vue'; import '../../../hooks/index.mjs'; import { cardProps } from './card.mjs'; import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs'; import { useNamespace } from '../../../hooks/use-namespace/index.mjs'; const __default__ = defineComponent({ inheritAttrs: false, name: "VsCard" }); const _sfc_main = defineComponent({ ...__default__, props: cardProps, setup(__props) { const ns = useNamespace("card"); return (_ctx, _cache) => { return openBlock(), createElementBlock( "div", { class: normalizeClass([unref(ns).b("content"), `type-${_ctx.type}`]) }, [ createElementVNode( "div", mergeProps({ class: unref(ns).b() }, _ctx.$attrs), [ _ctx.$slots.img ? (openBlock(), createElementBlock( "div", { key: 0, class: normalizeClass(unref(ns).e("img")) }, [ renderSlot(_ctx.$slots, "img"), _ctx.$slots.interactions ? (openBlock(), createElementBlock( "div", { key: 0, class: normalizeClass(unref(ns).e("interactions")) }, [ renderSlot(_ctx.$slots, "interactions") ], 2 )) : createCommentVNode("v-if", true) ], 2 )) : createCommentVNode("v-if", true), _ctx.$slots.text ? (openBlock(), createElementBlock( "div", { key: 1, class: normalizeClass(unref(ns).e("text")) }, [ _ctx.$slots.title ? (openBlock(), createElementBlock( "div", { key: 0, class: normalizeClass(unref(ns).e("title")) }, [ renderSlot(_ctx.$slots, "title") ], 2 )) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "text") ], 2 )) : createCommentVNode("v-if", true), _ctx.$slots.buttons ? (openBlock(), createElementBlock( "div", { key: 2, class: normalizeClass(unref(ns).e("button")) }, [ renderSlot(_ctx.$slots, "buttons") ], 2 )) : createCommentVNode("v-if", true) ], 16 ) ], 2 ); }; } }); var Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/vuesax-alpha/vuesax-alpha/packages/components/card/src/card.vue"]]); export { Card as default }; //# sourceMappingURL=card2.mjs.map