UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

35 lines (32 loc) 1.22 kB
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { useRenderStrategyProps } from '../../utils/use-render-strategy.js'; import { useTabsContext } from './use-tabs-context.js'; import _sfc_main$1 from '../presence/presence.vue.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "tab-content", props: { value: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const tabs = useTabsContext(); const renderStrategy = useRenderStrategyProps(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(_sfc_main$1), mergeProps(unref(tabs).getContentProps(props), { present: unref(tabs).value === props.value, "lazy-mount": unref(renderStrategy).lazyMount, "unmount-on-exit": unref(renderStrategy).unmountOnExit, immediate: true }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["present", "lazy-mount", "unmount-on-exit"]); }; } }); export { _sfc_main as default };