UNPKG

@ark-ui/vue

Version:

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

19 lines (18 loc) 583 B
import { useEmitAsProps } from "./use-emits-as-props.js"; import { useForwardProps } from "./use-forward-props.js"; import { computed } from "vue"; //#region src/utils/use-forward-props-emits.ts /** * Attribution: Radix Vue Team * Retrieved from: https://www.radix-vue.com/utilities/use-forward-props-emits.html */ function useForwardPropsEmits(props, emit) { const parsedProps = useForwardProps(props); const emitsAsProps = emit ? useEmitAsProps(emit) : {}; return computed(() => ({ ...parsedProps.value, ...emitsAsProps })); } //#endregion export { useForwardPropsEmits };