fix: Remove incorrect background logic from PageLayoutGridLayout (#16945)

Removes the background color logic that was incorrectly added to
PageLayoutGridLayout in PR #16870. Grid layouts are only used for
dashboards where widgets have their own background colors set in
WidgetCard.tsx, so the container background was causing visual
mismatches in padding/gap areas. The background logic remains correctly
applied in PageLayoutVerticalListViewer and PageLayoutVerticalListEditor
where widgets need to inherit the container background.

---------

Co-authored-by: Devessier <baptiste@devessier.fr>
This commit is contained in:
Abdullah.
2026-01-06 15:19:34 +05:00
committed by GitHub
parent de33d17809
commit 32efaee1bf
5 changed files with 19 additions and 32 deletions
@@ -1,4 +1,4 @@
import { useShouldUseWhiteBackground } from '@/page-layout/hooks/useShouldUseWhiteBackground';
import { usePageLayoutShouldUseWhiteBackground } from '@/page-layout/hooks/usePageLayoutShouldUseWhiteBackground';
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { WidgetRenderer } from '@/page-layout/widgets/components/WidgetRenderer';
import styled from '@emotion/styled';
@@ -22,7 +22,7 @@ type PageLayoutVerticalListViewerProps = {
export const PageLayoutVerticalListViewer = ({
widgets,
}: PageLayoutVerticalListViewerProps) => {
const { shouldUseWhiteBackground } = useShouldUseWhiteBackground();
const { shouldUseWhiteBackground } = usePageLayoutShouldUseWhiteBackground();
return (
<StyledVerticalListContainer