diff --git a/src/components/Dashboard/Wrappers/Wrapper/Wrapper.tsx b/src/components/Dashboard/Wrappers/Wrapper/Wrapper.tsx index ab8d92319..21491e9c1 100644 --- a/src/components/Dashboard/Wrappers/Wrapper/Wrapper.tsx +++ b/src/components/Dashboard/Wrappers/Wrapper/Wrapper.tsx @@ -1,4 +1,5 @@ import { WrapperType } from '../../../../types/wrapper'; +import { useEditModeStore } from '../../Views/useEditModeStore'; import { useGridstack } from '../gridstack/use-gridstack'; import { WrapperContent } from '../WrapperContent'; @@ -8,10 +9,12 @@ interface DashboardWrapperProps { export const DashboardWrapper = ({ wrapper }: DashboardWrapperProps) => { const { refs, apps, widgets } = useGridstack('wrapper', wrapper.id); + const isEditMode = useEditModeStore((x) => x.enabled); + const defaultClasses = 'grid-stack grid-stack-wrapper min-row'; return (
0 || isEditMode ? defaultClasses : `${defaultClasses} gridstack-empty-wrapper`} style={{ transitionDuration: '0s' }} data-wrapper={wrapper.id} ref={refs.wrapper} diff --git a/src/styles/global.scss b/src/styles/global.scss index 0c1fe9d34..d99f2f6b6 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -87,3 +87,8 @@ .grid-stack.grid-stack-animate { transition: none; } + +.gridstack-empty-wrapper { + height: 0px; + min-height: 0px !important; +} \ No newline at end of file