Skip to content

Commit 32e0ab5

Browse files
committed
chore: break classes for readability
1 parent 8ea1f94 commit 32e0ab5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/components/BannerGrid/index.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { ChildOnlyProp } from "@/lib/types"
44

55
import { Flex } from "@/components/ui/flex"
66

7+
import { cn } from "@/lib/utils/cn"
8+
79
export const Banner = ({ children }: ChildOnlyProp) => {
810
return (
911
<Flex className="flex-col flex-nowrap bg-banner-grid-gradient lg:flex-row [&_h2]:mt-0 [&_ul]:mb-0">
@@ -38,7 +40,20 @@ export const BannerGridCell = ({ children }: ChildOnlyProp) => {
3840
return (
3941
<Flex
4042
// TODO: refactor className to make it more readable
41-
className={`flex-col border-t border-t-search-background px-0 py-8 first:border-t-0 md:border-l md:border-l-search-background md:px-12 lg:[&:first-child]:border-l-0 lg:[&:first-child]:ps-0 md:[&:nth-child(-n+2)]:border-t-0 lg:[&:nth-child(-n+2)]:border-t lg:[&:nth-child(-n+2)]:border-t-search-background lg:[&:nth-child(-n+3)]:justify-start lg:[&:nth-child(-n+3)]:border-t-0 lg:[&:nth-child(-n+3)]:pt-0 md:[&:nth-child(2n+1)]:border-l-0 lg:[&:nth-child(2n+1)]:border-l lg:[&:nth-child(2n+1)]:border-l-search-background lg:[&:nth-child(3n+1)]:border-l-0 lg:[&:nth-child(3n+1)]:ps-0 lg:[&:nth-child(n+4)]:justify-start lg:[&:nth-child(n+4)]:pb-0`}
43+
className={cn(
44+
"px-0 py-8 md:px-12",
45+
"flex-col",
46+
"border-t border-t-search-background",
47+
"md:border-l md:border-l-search-background",
48+
"first:border-t-0",
49+
"md:[&:nth-child(-n+2)]:border-t-0 md:[&:nth-child(2n+1)]:border-l-0",
50+
"lg:[&:first-child]:border-l-0",
51+
"lg:[&:nth-child(-n+2)]:border-t lg:[&:nth-child(-n+2)]:border-t-search-background",
52+
"lg:[&:nth-child(2n+1)]:border-l lg:[&:nth-child(2n+1)]:border-l-search-background",
53+
"lg:[&:nth-child(-n+3)]:justify-start lg:[&:nth-child(-n+3)]:border-t-0 lg:[&:nth-child(-n+3)]:pt-0",
54+
"lg:[&:nth-child(3n+1)]:border-l-0 lg:[&:nth-child(3n+1)]:ps-0",
55+
"lg:[&:nth-child(n+4)]:justify-start lg:[&:nth-child(n+4)]:pb-0"
56+
)}
4257
>
4358
{children}
4459
</Flex>

0 commit comments

Comments
 (0)