@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
16 lines (13 loc) • 437 B
JavaScript
import { computed } from 'vue';
import { useEmitAsProps } from './use-emits-as-props.js';
import { useForwardProps } from './use-forward-props.js';
function useForwardPropsEmits(props, emit) {
const parsedProps = useForwardProps(props);
const emitsAsProps = emit ? useEmitAsProps(emit) : {};
return computed(() => ({
// @ts-expect-error
...parsedProps.value,
...emitsAsProps
}));
}
export { useForwardPropsEmits };