Skip to content

Commit

Permalink
Fix: fun with padding and margins (#4489)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Dec 24, 2024
1 parent 1c64805 commit 607c4b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/components/services/group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ 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";
let groupPadding = layout?.header === false ? "px-1" : "p-1 pb-0";
if (isSubgroup) groupPadding = "";

return (
Expand All @@ -36,7 +33,6 @@ export default function ServicesGroup({
"services-group flex-1",
layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/2 lg:basis-1/3 xl:basis-1/4",
layout?.style !== "row" && fiveColumns ? "3xl:basis-1/5" : "",
groupMargin,
groupPadding,
isSubgroup ? "subgroup" : "",
)}
Expand Down Expand Up @@ -89,6 +85,7 @@ export default function ServicesGroup({
services={group.services}
layout={layout}
useEqualHeights={useEqualHeights}
header={layout?.header !== false}
/>
{group.groups?.length > 0 && (
<div
Expand Down
5 changes: 3 additions & 2 deletions src/components/services/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { columnMap } from "../../utils/layout/columns";

import Item from "components/services/item";

export default function List({ groupName, services, layout, useEqualHeights }) {
export default function List({ groupName, services, layout, useEqualHeights, header }) {
return (
<ul
className={classNames(
layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col",
"mt-3 services-list",
header ? "mt-3" : "",
"services-list",
)}
>
{services.map((service) => (
Expand Down

0 comments on commit 607c4b7

Please sign in to comment.