Files
medusa-store/www/apps/api-reference/components/Section/Container/index.tsx
Shahed Nasser 4d632e7a5d docs: added tests for components in api-reference project (#14428)
* add tests (WIP)

* added test for h2

* finished adding tests

* fixes

* fixes

* fixes
2026-01-05 10:56:56 +02:00

37 lines
846 B
TypeScript

import React from "react"
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
)}
data-testid="section-container"
>
<WideSection>{children}</WideSection>
{!noDivider && <SectionDivider />}
</div>
)
}
)
export default SectionContainer