diff --git a/apps/www/src/lib/utils.ts b/apps/www/src/lib/utils.ts index e1d860eb..834ed631 100644 --- a/apps/www/src/lib/utils.ts +++ b/apps/www/src/lib/utils.ts @@ -1,7 +1,8 @@ import type { ClassValue } from 'clsx' import { clsx } from 'clsx' import { twMerge } from 'tailwind-merge' -import { camelize, getCurrentInstance, toHandlerKey } from 'vue' +import type { FunctionalComponent } from 'vue' +import { camelize, defineComponent, getCurrentInstance, h, toHandlerKey } from 'vue' export type ParseEmits> = { [K in keyof T]: (...args: T[K]) => void; @@ -31,3 +32,9 @@ export function useEmitAsProps( }) return result } + +export function convertToVNode(component: FunctionalComponent) { + return defineComponent({ + setup() { return () => h(component) }, + }) +}