Files
medusa-store/www/apps/api-reference/components/Section/Container/index.tsx
Shahed Nasser 936954e0b4 docs: fix divider in API reference + clean up layout (#10861)
* docs: fix divider in API reference + clean up layout

* fix build error
2025-01-07 14:59:39 +02:00

35 lines
780 B
TypeScript

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, className },
ref
) {
return (
<div
ref={ref}
className={clsx(
"relative pb-4 md:pb-7",
!noTopPadding && "pt-7",
className
)}
>
<WideSection>{children}</WideSection>
{!noDivider && <SectionDivider />}
</div>
)
}
)
export default SectionContainer