docs(recursive-list): update mentions of renamed children prop (#2055)

This commit is contained in:
Eric Liu 2024-11-21 10:40:10 -08:00 committed by GitHub
commit 07d226cd87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View file

@ -1,11 +1,17 @@
<script> <script>
import { InlineNotification, RecursiveList } from "carbon-components-svelte"; import { InlineNotification, RecursiveList, Link } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte"; import Preview from "../../components/Preview.svelte";
</script> </script>
This component uses the [svelte:self API](https://svelte.dev/docs#svelte_self) to render the [UnorderedList](/components/UnorderedList) and [OrderedList](/components/OrderedList) components with tree structured data. This component uses the [svelte:self API](https://svelte.dev/docs#svelte_self) to render the [UnorderedList](/components/UnorderedList) and [OrderedList](/components/OrderedList) components with tree structured data.
A child node can render text, a link, HTML content, and other children. A child node can render text, a link, HTML content, and other child nodes.
<InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton>
<div class="body-short-01">
In version 0.86.0, the <strong>children</strong> prop was renamed to <strong>nodes</strong> for <Link target="_blank" href="https://svelte.dev/docs/svelte/v5-migration-guide#The-children-prop-is-reserved">Svelte 5 compatibility</Link>.
</div>
</InlineNotification>
<InlineNotification svx-ignore lowContrast title="Warning:" kind="warning" hideCloseButton> <InlineNotification svx-ignore lowContrast title="Warning:" kind="warning" hideCloseButton>
<div class="body-short-01"> <div class="body-short-01">
@ -15,7 +21,7 @@ A child node can render text, a link, HTML content, and other children.
## Unordered ## Unordered
The `children` prop accepts an array of child nodes. The `nodes` prop accepts an array of child nodes.
By default, the list type is unordered. By default, the list type is unordered.

View file

@ -9,11 +9,11 @@ The `nodes` prop accepts an array of child nodes. Each node should contain `id`
Optional properties include `disabled`, `icon`, and `nodes`. Optional properties include `disabled`, `icon`, and `nodes`.
A parent node contains `nodes` (children) while a leaf node does not. A parent node contains `nodes` while a leaf node does not.
<InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton> <InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton>
<div class="body-short-01"> <div class="body-short-01">
In version 0.86.0, the <strong>children</strong> prop has been renamed to <strong>nodes</strong> for <Link target="_blank" href="https://svelte.dev/docs/svelte/v5-migration-guide#The-children-prop-is-reserved">Svelte 5 compatibility</Link>. In version 0.86.0, the <strong>children</strong> prop was renamed to <strong>nodes</strong> for <Link target="_blank" href="https://svelte.dev/docs/svelte/v5-migration-guide#The-children-prop-is-reserved">Svelte 5 compatibility</Link>.
</div> </div>
</InlineNotification> </InlineNotification>