From 16bf31c417b16be578de20c319e0cffba9f06f07 Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Wed, 29 Nov 2023 23:55:41 -0500 Subject: [PATCH] slot prop api section table --- src/components/api-ref/props-table.svelte | 24 ++++++++++++----------- src/components/api-section.svelte | 3 +++ src/content/api-reference/helpers.ts | 4 ++-- src/content/api-reference/radio-group.ts | 3 ++- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/components/api-ref/props-table.svelte b/src/components/api-ref/props-table.svelte index ffeb9b154..1ebb264d9 100644 --- a/src/components/api-ref/props-table.svelte +++ b/src/components/api-ref/props-table.svelte @@ -46,17 +46,19 @@

{@html parseMarkdown(description)}

-
- Default: - {#if defaultVal} - {` ${defaultVal}`} - {:else} -  —— - undefined - {/if} - -
+ {#if !slot} +
+ + Default: + {#if defaultVal} + {` ${defaultVal}`} + {:else} +  —— + undefined + {/if} + +
+ {/if} {/each} diff --git a/src/components/api-section.svelte b/src/components/api-section.svelte index 9b63e99c7..f240924c3 100644 --- a/src/components/api-section.svelte +++ b/src/components/api-section.svelte @@ -26,6 +26,9 @@ {#if schema.props} {/if} + {#if schema.slotProps} + + {/if} {#if schema.dataAttributes && schema.dataAttributes.length} {/if} diff --git a/src/content/api-reference/helpers.ts b/src/content/api-reference/helpers.ts index 130178d9d..b96103719 100644 --- a/src/content/api-reference/helpers.ts +++ b/src/content/api-reference/helpers.ts @@ -14,7 +14,7 @@ export const builderSlotProp: PropSchema = { definition: "{ [k: string]: any; action: Action}" }, description: - "The builder attributes and actions to apply to the element if using the `asChild` prop with [delegation[(/docs/delegation)." + "The builder attributes and actions to apply to the element if using the `asChild` prop with [delegation](/docs/delegation)." }; export const attrsSlotProp: PropSchema = { @@ -23,7 +23,7 @@ export const attrsSlotProp: PropSchema = { definition: "Record" }, description: - "Additional attributes to apply to the element if using the `asChild` prop with [delegation[(/docs/delegation)." + "Additional attributes to apply to the element if using the `asChild` prop with [delegation](/docs/delegation)." }; export const builderAndAttrsSlotProps: Record = { diff --git a/src/content/api-reference/radio-group.ts b/src/content/api-reference/radio-group.ts index 3bda7d823..79771ca6a 100644 --- a/src/content/api-reference/radio-group.ts +++ b/src/content/api-reference/radio-group.ts @@ -53,7 +53,8 @@ export const root: APISchema = { { name: "orientation", value: enums("vertical", "horizontal"), - description: "The orientation of the radio group." + description: "The orientation of the radio group.", + isEnum: true }, { name: "radio-group-root",