diff --git a/docs/app/components/content/ComponentProps.vue b/docs/app/components/content/ComponentProps.vue index f2801d05..d6e124d1 100644 --- a/docs/app/components/content/ComponentProps.vue +++ b/docs/app/components/content/ComponentProps.vue @@ -52,6 +52,8 @@ const metaProps: ComputedRef = computed(() => { + + diff --git a/docs/app/components/content/ComponentPropsSchema.vue b/docs/app/components/content/ComponentPropsSchema.vue new file mode 100644 index 00000000..b33e5c96 --- /dev/null +++ b/docs/app/components/content/ComponentPropsSchema.vue @@ -0,0 +1,31 @@ + + + diff --git a/docs/app/components/content/HighlightInlineType.vue b/docs/app/components/content/HighlightInlineType.vue index 817800a0..0d259010 100644 --- a/docs/app/components/content/HighlightInlineType.vue +++ b/docs/app/components/content/HighlightInlineType.vue @@ -5,7 +5,18 @@ const props = defineProps<{ type: string }>() -const { data: ast } = await useAsyncData(`hightlight-inline-code-` + props.type, () => parseMarkdown(`\`${props.type}\`{lang="ts-type"}`)) +const type = computed(() => { + if (props.type.includes(', "as" | "asChild" | "forceMount">')) { + return props.type.replace(`, "as" | "asChild" | "forceMount">`, ``).replace('Omit<', '') + } + if (props.type.includes(', "as" | "asChild">')) { + return props.type.replace(', "as" | "asChild">', '').replace('Omit<', '') + } + + return props.type +}) + +const { data: ast } = await useAsyncData(`hightlight-inline-code-` + props.type, () => parseMarkdown(`\`${type.value}\`{lang="ts-type"}`))