Skip to content

Commit

Permalink
Make Spacer height resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira committed Feb 23, 2024
1 parent 1ae8a85 commit 1dba2a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,9 @@ export default function RenderOverlay({ bridge }: RenderOverlayProps) {
isElementNode &&
!isPageRow(node) &&
!isPageColumn(node) &&
(nodeComponentId === 'Chart' || nodeComponentId === 'DataGrid');
(nodeComponentId === 'Chart' ||
nodeComponentId === 'DataGrid' ||
nodeComponentId === 'Spacer');

const isResizing = Boolean(draggedEdge);
const isResizingNode = isResizing && node.id === draggedNodeId;
Expand Down
2 changes: 1 addition & 1 deletion packages/toolpad-components/src/Spacer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Box, BoxProps } from '@mui/material';
import createBuiltin from './createBuiltin';
import { SX_PROP_HELPER_TEXT } from './constants';

const SPACER_MINIMUM_HEIGHT = 20; // pixels
const SPACER_MINIMUM_HEIGHT = 60; // pixels

function Spacer(props: BoxProps) {
return <Box {...props} height="100%" minHeight={SPACER_MINIMUM_HEIGHT} />;
Expand Down

0 comments on commit 1dba2a3

Please sign in to comment.