File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/components/BannerGrid Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { ChildOnlyProp } from "@/lib/types"
4
4
5
5
import { Flex } from "@/components/ui/flex"
6
6
7
+ import { cn } from "@/lib/utils/cn"
8
+
7
9
export const Banner = ( { children } : ChildOnlyProp ) => {
8
10
return (
9
11
< 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) => {
38
40
return (
39
41
< Flex
40
42
// 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
+ ) }
42
57
>
43
58
{ children }
44
59
</ Flex >
You can’t perform that action at this time.
0 commit comments