Skip to content

Commit

Permalink
[tree view][docs] Adjust all demos height to account for the updated …
Browse files Browse the repository at this point in the history
…design (#11979)

Co-authored-by: alexandre <[email protected]>
Co-authored-by: noraleonte <[email protected]>
  • Loading branch information
3 people authored Feb 15, 2024
1 parent 4613e48 commit d28d48a
Show file tree
Hide file tree
Showing 49 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs/data/tree-view/getting-started/FirstComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function FirstComponent() {
return (
<SimpleTreeView
aria-label="file system navigator"
sx={{ height: 240, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
sx={{ height: 200, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
>
<TreeItem nodeId="1" label="Applications">
<TreeItem nodeId="2" label="Calendar" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/getting-started/FirstComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function FirstComponent() {
return (
<SimpleTreeView
aria-label="file system navigator"
sx={{ height: 240, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
sx={{ height: 200, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
>
<TreeItem nodeId="1" label="Applications">
<TreeItem nodeId="2" label="Calendar" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<SimpleTreeView
aria-label="file system navigator"
sx={{ height: 240, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
sx={{ height: 200, flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
>
<TreeItem nodeId="1" label="Applications">
<TreeItem nodeId="2" label="Calendar" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/overview/BasicRichTreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MUI_X_PRODUCTS = [

export default function BasicRichTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/overview/BasicRichTreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MUI_X_PRODUCTS: TreeViewBaseItem[] = [

export default function BasicRichTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/overview/BasicSimpleTreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TreeItem } from '@mui/x-tree-view/TreeItem';

export default function BasicSimpleTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/overview/BasicSimpleTreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TreeItem } from '@mui/x-tree-view/TreeItem';

export default function BasicSimpleTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function ControlledExpansion() {
{expandedNodes.length === 0 ? 'Expand all' : 'Collapse all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
expandedNodes={expandedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function ControlledExpansion() {
{expandedNodes.length === 0 ? 'Expand all' : 'Collapse all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
expandedNodes={expandedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{expandedNodes.length === 0 ? 'Expand all' : 'Collapse all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
expandedNodes={expandedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function TrackNodeExpansionToggle() {
</Typography>
)}

<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeExpansionToggle={handleNodeExpansionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function TrackNodeExpansionToggle() {
Last action: {action.isExpanded ? 'expand' : 'collapse'} {action.nodeId}
</Typography>
)}
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeExpansionToggle={handleNodeExpansionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Last action: {action.isExpanded ? 'expand' : 'collapse'} {action.nodeId}
</Typography>
)}
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeExpansionToggle={handleNodeExpansionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MUI_X_PRODUCTS = [

export default function BasicRichTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MUI_X_PRODUCTS: TreeViewBaseItem[] = [

export default function BasicRichTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function DisabledItemsFocusable() {
label="Allow focusing disabled items"
/>
</Box>
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
isItemDisabled={isItemDisabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function DisabledItemsFocusable() {
label="Allow focusing disabled items"
/>
</Box>
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
isItemDisabled={isItemDisabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const isItemDisabled = (item) => !!item.disabled;

export default function DisabledPropItem() {
return (
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} isItemDisabled={isItemDisabled} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const isItemDisabled = (item: MuiXProduct) => !!item.disabled;

export default function DisabledPropItem() {
return (
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} isItemDisabled={isItemDisabled} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/rich-tree-view/items/GetItemId.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getItemId = (item) => item.internalId;

export default function GetItemId() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} getItemId={getItemId} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/rich-tree-view/items/GetItemId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getItemId = (item: MuiXProduct) => item.internalId;

export default function GetItemId() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} getItemId={getItemId} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/rich-tree-view/items/GetItemLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getItemLabel = (item) => item.name;

export default function GetItemLabel() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} getItemLabel={getItemLabel} />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/rich-tree-view/items/GetItemLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getItemLabel = (item: MuiXProduct) => item.name;

export default function GetItemLabel() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView items={MUI_X_PRODUCTS} getItemLabel={getItemLabel} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function ControlledSelection() {
{selectedNodes.length === 0 ? 'Select all' : 'Unselect all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
selectedNodes={selectedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ControlledSelection() {
{selectedNodes.length === 0 ? 'Select all' : 'Unselect all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
selectedNodes={selectedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{selectedNodes.length === 0 ? 'Select all' : 'Unselect all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
selectedNodes={selectedNodes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MUI_X_PRODUCTS = [

export default function DisableSelection() {
return (
<Box sx={{ height: 264, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView disableSelection items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MUI_X_PRODUCTS: TreeViewBaseItem[] = [

export default function DisableSelection() {
return (
<Box sx={{ height: 264, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView disableSelection items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MUI_X_PRODUCTS = [

export default function MultiSelectTreeView() {
return (
<Box sx={{ height: 264, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView multiSelect items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const MUI_X_PRODUCTS: TreeViewBaseItem[] = [

export default function MultiSelectTreeView() {
return (
<Box sx={{ height: 264, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<RichTreeView multiSelect items={MUI_X_PRODUCTS} />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function TrackNodeSelectionToggle() {
? 'No node selection recorded'
: `Last selected node: ${lastSelectedNode}`}
</Typography>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, minWidth: 250, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeSelectionToggle={handleNodeSelectionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function TrackNodeSelectionToggle() {
? 'No node selection recorded'
: `Last selected node: ${lastSelectedNode}`}
</Typography>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, minWidth: 250, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeSelectionToggle={handleNodeSelectionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
? 'No node selection recorded'
: `Last selected node: ${lastSelectedNode}`}
</Typography>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, minWidth: 250, flexGrow: 1 }}>
<RichTreeView
items={MUI_X_PRODUCTS}
onNodeSelectionToggle={handleNodeSelectionToggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ControlledExpansion() {
{expandedNodes.length === 0 ? 'Expand all' : 'Collapse all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView
expandedNodes={expandedNodes}
onExpandedNodesChange={handleExpandedNodesChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function ControlledExpansion() {
{expandedNodes.length === 0 ? 'Expand all' : 'Collapse all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView
expandedNodes={expandedNodes}
onExpandedNodesChange={handleExpandedNodesChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function TrackNodeExpansionToggle() {
</Typography>
)}

<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView onNodeExpansionToggle={handleNodeExpansionToggle}>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function TrackNodeExpansionToggle() {
Last action: {action.isExpanded ? 'expand' : 'collapse'} {action.nodeId}
</Typography>
)}
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView onNodeExpansionToggle={handleNodeExpansionToggle}>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TreeItem } from '@mui/x-tree-view/TreeItem';

export default function BasicSimpleTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TreeItem } from '@mui/x-tree-view/TreeItem';

export default function BasicSimpleTreeView() {
return (
<Box sx={{ height: 168, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ height: 220, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function DisabledItemsFocusable() {
label="Allow focusing disabled items"
/>
</Box>
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView disabledItemsFocusable={disabledItemsFocusable}>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function DisabledItemsFocusable() {
label="Allow focusing disabled items"
/>
</Box>
<Box sx={{ height: 312, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView disabledItemsFocusable={disabledItemsFocusable}>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ControlledSelection() {
{selectedNodes.length === 0 ? 'Select all' : 'Unselect all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView
selectedNodes={selectedNodes}
onSelectedNodesChange={handleSelectedNodesChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ControlledSelection() {
{selectedNodes.length === 0 ? 'Select all' : 'Unselect all'}
</Button>
</Box>
<Box sx={{ height: 264, flexGrow: 1 }}>
<Box sx={{ minHeight: 200, flexGrow: 1 }}>
<SimpleTreeView
selectedNodes={selectedNodes}
onSelectedNodesChange={handleSelectedNodesChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TreeItem } from '@mui/x-tree-view/TreeItem';

export default function DisableSelection() {
return (
<Box sx={{ height: 264, flexGrow: 1, maxWidth: 400 }}>
<Box sx={{ minHeight: 200, flexGrow: 1, maxWidth: 400 }}>
<SimpleTreeView disableSelection>
<TreeItem nodeId="grid" label="Data Grid">
<TreeItem nodeId="grid-community" label="@mui/x-data-grid" />
Expand Down
Loading

0 comments on commit d28d48a

Please sign in to comment.