Skip to content

Commit 14fd24e

Browse files
committed
chore: refactor classes for rtl version
1 parent 6bb8abe commit 14fd24e

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/components/BannerGrid/index.tsx

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,23 @@ import { cn } from "@/lib/utils/cn"
88

99
export const Banner = ({ children }: ChildOnlyProp) => {
1010
return (
11-
<Flex className="flex-col flex-nowrap bg-banner-grid-gradient lg:flex-row [&_h2]:mt-0 [&_ul]:mb-0">
11+
<Flex className="w-full flex-col flex-nowrap bg-banner-grid-gradient lg:flex-row [&_h2]:mt-0 [&_ul]:mb-0">
1212
{children}
1313
</Flex>
1414
)
1515
}
1616

1717
export const BannerBody = ({ children }: ChildOnlyProp) => {
18-
return (
19-
<div className="flex-shrink-[1] flex-grow-[4] basis-0 p-10">{children}</div>
20-
)
18+
return <div className="w-full flex-[4] p-10">{children}</div>
2119
}
2220

2321
export const BannerImage = ({ children }) => {
24-
return (
25-
<Flex className="flex-shrink-[1] flex-grow-[2] basis-0 justify-end self-end">
26-
{children}
27-
</Flex>
28-
)
22+
return <Flex className="flex-[2] justify-end self-end">{children}</Flex>
2923
}
3024

3125
export const BannerGrid = ({ children }: ChildOnlyProp) => {
3226
return (
33-
<div className="grid grid-cols-1 gap-0 md:grid-cols-2 md:grid-rows-3 lg:grid-cols-3 lg:grid-rows-2">
27+
<div className="md:grid-rows-[repeat(3, 1fr)] lg:grid-rows-[repeat(2, 1fr)] grid w-full grid-cols-[repeat(1,1fr)] gap-0 md:grid-cols-[repeat(2,1fr)] lg:grid-cols-[repeat(3,1fr)]">
3428
{children}
3529
</div>
3630
)
@@ -43,13 +37,13 @@ export const BannerGridCell = ({ children }: ChildOnlyProp) => {
4337
"px-0 py-8 md:px-12",
4438
"flex-col",
4539
"border-t border-t-search-background",
46-
"md:border-l md:border-l-search-background",
40+
"md:border-s md:border-s-search-background",
4741
"first:border-t-0",
48-
"lg:[&:first-child]:border-l-0",
42+
"lg:[&:first-child]:border-s-0",
4943
"md:[&:nth-child(-n+2)]:border-t-0 lg:[&:nth-child(-n+2)]:border-t lg:[&:nth-child(-n+2)]:border-t-search-background",
50-
"md:[&:nth-child(2n+1)]:border-l-0 lg:[&:nth-child(2n+1)]:border-l lg:[&:nth-child(2n+1)]:border-l-search-background",
44+
"md:[&:nth-child(2n+1)]:border-s-0 lg:[&:nth-child(2n+1)]:border-s lg:[&:nth-child(2n+1)]:border-s-search-background",
5145
"lg:[&:nth-child(-n+3)]:justify-start lg:[&:nth-child(-n+3)]:border-t-0 lg:[&:nth-child(-n+3)]:pt-0",
52-
"lg:[&:nth-child(3n+1)]:border-l-0 lg:[&:nth-child(3n+1)]:ps-0",
46+
"lg:[&:nth-child(3n+1)]:border-s-0 lg:[&:nth-child(3n+1)]:ps-0",
5347
"lg:[&:nth-child(n+4)]:justify-start lg:[&:nth-child(n+4)]:pb-0"
5448
)}
5549
>

0 commit comments

Comments
 (0)