Skip to content

Commit

Permalink
Remove Spacer component
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira committed Feb 23, 2024
1 parent 1dba2a3 commit 6e1e06c
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 58 deletions.
1 change: 0 additions & 1 deletion docs/data/toolpad/reference/components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
- [PageRow](/toolpad/reference/components/page-row/)
- [Paper](/toolpad/reference/components/paper/)
- [Select](/toolpad/reference/components/select/)
- [Spacer](/toolpad/reference/components/spacer/)
- [Stack](/toolpad/reference/components/stack/)
- [Tabs](/toolpad/reference/components/tabs/)
- [Text](/toolpad/reference/components/text/)
Expand Down
4 changes: 0 additions & 4 deletions docs/data/toolpad/reference/components/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@
"title": "Select",
"pathname": "/toolpad/reference/components/select"
},
{
"title": "Spacer",
"pathname": "/toolpad/reference/components/spacer"
},
{
"title": "Stack",
"pathname": "/toolpad/reference/components/stack"
Expand Down
14 changes: 0 additions & 14 deletions docs/data/toolpad/reference/components/spacer.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/pages/toolpad/reference/components/spacer.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as appDom from '@mui/toolpad-core/appDom';

export const PAGE_ROW_COMPONENT_ID = 'PageRow';
export const PAGE_COLUMN_COMPONENT_ID = 'PageColumn';
export const SPACER_COMPONENT_ID = 'Spacer';
export const STACK_COMPONENT_ID = 'Stack';
export const FORM_COMPONENT_ID = 'Form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const iconMap = new Map<string, React.ComponentType<SvgIconProps>>([
['PageRow', TableRowsIcon],
['PageColumn', ViewColumnIcon],
['Metric', TagIcon],
['Spacer', SpaceBarIcon],
]);

type ComponentItemKind = 'future' | 'builtIn' | 'create' | 'custom';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1475,8 +1475,7 @@ export default function RenderOverlay({ bridge }: RenderOverlayProps) {
!isPageRow(node) &&
!isPageColumn(node) &&
(nodeComponentId === 'Chart' ||
nodeComponentId === 'DataGrid' ||
nodeComponentId === 'Spacer');
nodeComponentId === 'DataGrid');

const isResizing = Boolean(draggedEdge);
const isResizingNode = isResizing && node.id === draggedNodeId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
FORM_COMPONENT_ID,
PAGE_COLUMN_COMPONENT_ID,
PAGE_ROW_COMPONENT_ID,
SPACER_COMPONENT_ID,
STACK_COMPONENT_ID,
} from '../../runtime/toolpadComponents';
import { useProject } from '../../project';
Expand Down Expand Up @@ -115,10 +114,6 @@ export const INTERNAL_COMPONENTS = new Map<string, ToolpadComponentDefinition>([
},
],
[FORM_COMPONENT_ID, { displayName: 'Form', builtIn: 'Form', synonyms: [] }],
[
SPACER_COMPONENT_ID,
{ displayName: 'Spacer', builtIn: 'Spacer', synonyms: ['margin', 'blank', 'empty', 'void'] },
],
[
'Password',
{
Expand Down
21 changes: 0 additions & 21 deletions packages/toolpad-components/src/Spacer.tsx

This file was deleted.

0 comments on commit 6e1e06c

Please sign in to comment.