From 2d91b2b74881d7bb95c3cf2ffc30c97d73a834db Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 22 Dec 2024 17:48:49 -0800 Subject: [PATCH] Tweak: remove extra padding for nested groups (#4474) --- src/components/services/group.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/services/group.jsx b/src/components/services/group.jsx index f25f7ec10..f646f5535 100644 --- a/src/components/services/group.jsx +++ b/src/components/services/group.jsx @@ -15,6 +15,7 @@ export default function ServicesGroup({ disableCollapse, useEqualHeights, groupsInitiallyCollapsed, + isSubgroup, }) { const panel = useRef(); @@ -22,14 +23,22 @@ export default function ServicesGroup({ if (layout?.initiallyCollapsed ?? groupsInitiallyCollapsed) panel.current.style.height = `0`; }, [layout, groupsInitiallyCollapsed]); + let groupMargin = layout?.header === false ? "-my-1" : ""; + if (isSubgroup && layout?.header === false) groupMargin = "-my-3"; + + let groupPadding = layout?.header === false ? "px-1" : "p-1"; + if (isSubgroup) groupPadding = ""; + return (