@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
17 lines (14 loc) • 464 B
JavaScript
import { defineComponent, ref, onMounted, renderSlot } from 'vue';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "client-only",
setup(__props) {
const isClient = ref(false);
onMounted(() => {
isClient.value = true;
});
return (_ctx, _cache) => {
return isClient.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : renderSlot(_ctx.$slots, "fallback", { key: 1 });
};
}
});
export { _sfc_main as default };