Skip to content

Commit

Permalink
Merge pull request #13784 from ethereum/main-article-tw
Browse files Browse the repository at this point in the history
refactor: MainArticle for tailwind
  • Loading branch information
pettinarip authored Sep 5, 2024
2 parents 67eebaa + 3fd246d commit c738a39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/components/MainArticle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Box, type BoxProps } from "@chakra-ui/react"
import { cn } from "@/lib/utils/cn"

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

const MainArticle = (props: BoxProps) => (
<Box as="article" id={MAIN_CONTENT_ID} scrollMarginTop={24} {...props} />
const MainArticle = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<article
id={MAIN_CONTENT_ID}
className={cn("scroll-mt-24", className)}
{...props}
/>
)

export default MainArticle
2 changes: 1 addition & 1 deletion src/pages/developers/learning-tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ const LearningToolsPage = () => {
"page-developers-learning-tools:page-learning-tools-meta-desc"
)}
/>
<MainArticle w="full">
<MainArticle className="w-full">
<Box w="full">
<Header>
<H1>
Expand Down

0 comments on commit c738a39

Please sign in to comment.