Skip to content

Commit c738a39

Browse files
authored
Merge pull request #13784 from ethereum/main-article-tw
refactor: MainArticle for tailwind
2 parents 67eebaa + 3fd246d commit c738a39

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/components/MainArticle.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
import { Box, type BoxProps } from "@chakra-ui/react"
1+
import { cn } from "@/lib/utils/cn"
22

33
import { MAIN_CONTENT_ID } from "@/lib/constants"
44

5-
const MainArticle = (props: BoxProps) => (
6-
<Box as="article" id={MAIN_CONTENT_ID} scrollMarginTop={24} {...props} />
5+
const MainArticle = ({
6+
className,
7+
...props
8+
}: React.HTMLAttributes<HTMLDivElement>) => (
9+
<article
10+
id={MAIN_CONTENT_ID}
11+
className={cn("scroll-mt-24", className)}
12+
{...props}
13+
/>
714
)
815

916
export default MainArticle

src/pages/developers/learning-tools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ const LearningToolsPage = () => {
424424
"page-developers-learning-tools:page-learning-tools-meta-desc"
425425
)}
426426
/>
427-
<MainArticle w="full">
427+
<MainArticle className="w-full">
428428
<Box w="full">
429429
<Header>
430430
<H1>

0 commit comments

Comments
 (0)