Skip to content

Commit

Permalink
Add four columns option to {.people-rows}
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Dec 12, 2024
1 parent 39b5c25 commit 08c9ab2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export type EnrichedBlockNumberedList = {
export type RawBlockPeopleRows = {
type: "people-rows"
value: {
columns: "2"
columns: "2" | "4"
people: RawBlockPerson[]
}
}
Expand All @@ -281,7 +281,7 @@ export type RawBlockPerson = {

export type EnrichedBlockPeopleRows = {
type: "people-rows"
columns: "2"
columns: "2" | "4"
people: EnrichedBlockPerson[]
} & EnrichedBlockWithParseErrors

Expand Down
12 changes: 12 additions & 0 deletions site/gdocs/components/People.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,15 @@
}
}
}

.people-cols-4 {
@include lg-up {
.article-block__text {
@include body-3-medium;
}

.person-socials {
@include body-3-medium;
}
}
}
9 changes: 6 additions & 3 deletions site/gdocs/components/People.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ export default function People({
children,
}: {
className?: string
columns?: "2"
columns?: "2" | "4"
children: React.ReactNode
}) {
return (
<div
className={cx(
"people grid-cols-2",
"people",
{
"people-cols-2 grid-md-cols-1": columns === "2",
"grid-cols-2": !columns,
"people-cols-2 grid-cols-2 grid-md-cols-1": columns === "2",
"people-cols-4 grid-cols-4 grid-lg-cols-2 grid-sm-cols-1":
columns === "4",
},
className
)}
Expand Down

0 comments on commit 08c9ab2

Please sign in to comment.