- Improve intro sections of API reference to utilize divided columns - Improve the content of the intro sections - Add a new Workflows section to explain the workflows badge and how to use it - Fixes to headings and add anchor for copying the link to a section - Fixes responsiveness of intro sections on mobile devices - Other: fix loading not showing when a sidebar category is opened. Closes DOCS-932, DOCS-934, DOCS-937 Preview: https://api-reference-v2-git-docs-api-ref-intro-fixes-medusajs.vercel.app/v2/api/store
29 lines
669 B
TypeScript
29 lines
669 B
TypeScript
import clsx from "clsx"
|
|
import SectionDivider from "../Divider"
|
|
import { forwardRef } from "react"
|
|
|
|
type SectionContainerProps = {
|
|
children: React.ReactNode
|
|
noTopPadding?: boolean
|
|
noDivider?: boolean
|
|
}
|
|
|
|
const SectionContainer = forwardRef<HTMLDivElement, SectionContainerProps>(
|
|
function SectionContainer(
|
|
{ children, noTopPadding = false, noDivider = false },
|
|
ref
|
|
) {
|
|
return (
|
|
<div
|
|
className={clsx("relative pb-4 md:pb-7", !noTopPadding && "pt-7")}
|
|
ref={ref}
|
|
>
|
|
{children}
|
|
{!noDivider && <SectionDivider className="-left-1.5 lg:!-left-full" />}
|
|
</div>
|
|
)
|
|
}
|
|
)
|
|
|
|
export default SectionContainer
|