import { makeComponentProps } from '@/composables/component' import { makeTagProps } from '@/composables/tag' import { genericComponent, propsFactory } from '@/utils' import { consoleWarn } from '@/utils' export const makeUExampleComponentProps = propsFactory( { type: { type: String, default: 'example', }, ...makeComponentProps(), ...makeTagProps(), }, 'UExampleComponent' ) export type UExampleComponentSlots = { default: never } export const UExampleComponent = genericComponent()({ name: 'UExampleComponent', props: makeUExampleComponentProps(), setup(props, { slots }) { const type = props.type if (type === 'example') { console.log('Hey') } return () => (
{slots.default?.()}
) }, }) export type UExampleComponent = InstanceType