Skip to content

Commit 41ce6bf

Browse files
authored
docs: add version badge to tree dnd docs + fix render props example (#8347)
* add version badge to tree dnd docs * fix render props docs example
1 parent 92e3627 commit 41ce6bf

File tree

1 file changed

+7
-5
lines changed
  • packages/react-aria-components/docs

1 file changed

+7
-5
lines changed

packages/react-aria-components/docs/Tree.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ Use the `renderEmptyState` prop to customize what the `Tree` will display if the
767767

768768
</details>
769769

770-
## Drag and drop
770+
## Drag and drop <VersionBadge version="beta" style={{marginLeft: 4, verticalAlign: 'bottom'}} />
771771

772772
Tree supports drag and drop interactions when the `dragAndDropHooks` prop is provided using the <TypeLink links={docs.links} type={docs.exports.useDragAndDrop} /> hook. Users can drop data on the tree as a whole, on individual items, insert new items between existing ones, or move items within the tree hierarchy.
773773

@@ -1877,12 +1877,14 @@ Render props may also be used as children to alter what elements are rendered ba
18771877

18781878
```jsx
18791879
<TreeItem>
1880-
{({selectionMode}) => (
18811880
<TreeItemContent>
1882-
{selectionMode !== 'none' && <Checkbox />}
1883-
Item
1881+
{({selectionMode}) => (
1882+
<>
1883+
{selectionMode !== 'none' && <Checkbox />}
1884+
Item
1885+
</>
1886+
)}
18841887
</TreeItemContent>
1885-
)}
18861888
</TreeItem>
18871889
```
18881890

0 commit comments

Comments
 (0)