@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
26 lines (23 loc) • 859 B
JavaScript
import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';
import { ark } from '../factory.js';
import { useCollapsibleContext } from './use-collapsible-context.js';
import { useForwardExpose } from '../../utils/use-forward-expose.js';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "collapsible-trigger",
props: {
asChild: { type: Boolean }
},
setup(__props) {
const collapsible = useCollapsibleContext();
useForwardExpose();
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ark).button, normalizeProps(guardReactiveProps(unref(collapsible).getTriggerProps())), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16);
};
}
});
export { _sfc_main as default };