Skip to content

Commit

Permalink
docs(recursive-list): update mentions of renamed children prop (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym authored Nov 21, 2024
1 parent b9b7bae commit 07d226c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions docs/src/pages/components/RecursiveList.svx
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<script>
import { InlineNotification, RecursiveList } from "carbon-components-svelte";
import { InlineNotification, RecursiveList, Link } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</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.

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>
<div class="body-short-01">
Expand All @@ -15,7 +21,7 @@ A child node can render text, a link, HTML content, and other children.

## 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.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/TreeView.svx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

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>
<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>
</InlineNotification>

Expand Down

0 comments on commit 07d226c

Please sign in to comment.