docs: fix divider in API reference + clean up layout (#10861)
* docs: fix divider in API reference + clean up layout * fix build error
This commit is contained in:
@@ -1,27 +1,31 @@
|
||||
import clsx from "clsx"
|
||||
import SectionDivider from "../Divider"
|
||||
import { forwardRef } from "react"
|
||||
import { WideSection } from "docs-ui"
|
||||
|
||||
type SectionContainerProps = {
|
||||
children: React.ReactNode
|
||||
noTopPadding?: boolean
|
||||
noDivider?: boolean
|
||||
className?: string
|
||||
}
|
||||
|
||||
const SectionContainer = forwardRef<HTMLDivElement, SectionContainerProps>(
|
||||
function SectionContainer(
|
||||
{ children, noTopPadding = false, noDivider = false },
|
||||
{ children, noTopPadding = false, noDivider = false, className },
|
||||
ref
|
||||
) {
|
||||
return (
|
||||
<div
|
||||
className={clsx("relative pb-4 md:pb-7", !noTopPadding && "pt-7")}
|
||||
ref={ref}
|
||||
>
|
||||
{children}
|
||||
{!noDivider && (
|
||||
<SectionDivider className="-left-[16px] lg:!-left-1/4" />
|
||||
className={clsx(
|
||||
"relative pb-4 md:pb-7",
|
||||
!noTopPadding && "pt-7",
|
||||
className
|
||||
)}
|
||||
>
|
||||
<WideSection>{children}</WideSection>
|
||||
{!noDivider && <SectionDivider />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user