Skip to content

Commit

Permalink
Remove demo
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Nov 7, 2024
1 parent bafa1a0 commit 60aeae6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 209 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,14 @@ See [Tree Item Customization—Change nested item's indentation](/x/react-tree-v

If you used to style your content element (for example to add a border to it) and you don't use the drag and drop re-ordering, you can manually put the padding on the group transition element to restore the previous behavior:

{{"demo": "ItemIndentationWithBorder.js"}}
```tsx
const CustomTreeItemContent = styled(TreeItemContent)(({ theme }) => ({
// Remove the additional padding of nested elements
padding: theme.spacing(0.5, 1),
}));

const CustomTreeItemGroupTransition = styled(TreeItemGroupTransition)({
// Add the padding back on the group transition element
paddingLeft: 'var(--TreeView-itemChildrenIndentation) !important',
});
```

0 comments on commit 60aeae6

Please sign in to comment.