mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	Fix: fun with padding and margins (#4489)
This commit is contained in:
		
							parent
							
								
									1c6480586c
								
							
						
					
					
						commit
						607c4b7750
					
				@ -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 (
 | 
			
		||||
@ -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" : "",
 | 
			
		||||
      )}
 | 
			
		||||
@ -89,6 +85,7 @@ export default function ServicesGroup({
 | 
			
		||||
                  services={group.services}
 | 
			
		||||
                  layout={layout}
 | 
			
		||||
                  useEqualHeights={useEqualHeights}
 | 
			
		||||
                  header={layout?.header !== false}
 | 
			
		||||
                />
 | 
			
		||||
                {group.groups?.length > 0 && (
 | 
			
		||||
                  <div
 | 
			
		||||
 | 
			
		||||
@ -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) => (
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user