diff --git a/sites/docs/content/utilities/without-child.md b/sites/docs/content/utilities/without-child.md index cdac9911a..1c30d47b1 100644 --- a/sites/docs/content/utilities/without-child.md +++ b/sites/docs/content/utilities/without-child.md @@ -6,3 +6,17 @@ description: A type helper to exclude the child snippet prop from a component. The `WithoutChild` type helper is used to exclude the `child` snippet prop from a component. This is useful when you're building custom component wrappers that populate the `children` prop of a component and don't provide a way to pass a custom `child` snippet. To learn more about the `child` snippet prop, check out the [delegation](/docs/delegation) documentation. + +```svelte title="CustomAccordionHeader.svelte" + + + + + {@render children?.()} + + +``` diff --git a/sites/docs/content/utilities/without-children-or-child.md b/sites/docs/content/utilities/without-children-or-child.md index 5df3bc8a9..f2b43d277 100644 --- a/sites/docs/content/utilities/without-children-or-child.md +++ b/sites/docs/content/utilities/without-children-or-child.md @@ -3,29 +3,27 @@ title: WithoutChildrenOrChild description: A type helper to exclude the child ad children snippet props from a component. --- -The `WithoutChildrenOrChild` type helper is used to exclude the `child` and `children` snippet props from a component. This is useful when you're building custom component wrappers that populate the `children` prop of a component and don't provide a way to pass a custom `children` or `child` snippet. +The `WithoutChildrenOrChild` type helper is used to exclude the `child` and `children` props from a component. This is useful when you're building custom component wrappers that populate the `children` prop of a component and don't provide a way to pass a custom `children` or `child` snippet. To learn more about the `child` snippet prop, check out the [delegation](/docs/delegation) documentation. -```svelte title="CustomAccordion.svelte" +```svelte title="CustomAccordionTrigger.svelte" - - - - - - - + + {title} + ``` -Now, the `CustomAccordion` component won't expose `children` or `child` snippet props to the user, but will expose the other root component props. +Now, the `CustomAccordionTrigger` component won't expose `children` or `child` props to the user, but will expose the other root component props. diff --git a/sites/docs/content/utilities/without-children.md b/sites/docs/content/utilities/without-children.md index 8cdff831d..a6292255d 100644 --- a/sites/docs/content/utilities/without-children.md +++ b/sites/docs/content/utilities/without-children.md @@ -9,12 +9,7 @@ The `WithoutChildren` type helper is used to exclude the `children` snippet prop