1
0
mirror of synced 2026-01-03 06:04:16 -05:00
Files
docs/components/landing/LandingSection.tsx
2023-05-01 14:53:55 +00:00

26 lines
699 B
TypeScript

import cx from 'classnames'
import { HeadingLink } from 'components/article/HeadingLink'
type Props = {
title?: string
sectionLink?: string
children?: React.ReactNode
className?: string
description?: string
}
export const LandingSection = ({ title, children, className, sectionLink, description }: Props) => {
return (
<div className={cx('container-xl px-3 px-md-6 mt-6', className)}>
{title && (
<HeadingLink as="h2" slug={sectionLink} className="mb-4">
{title}
</HeadingLink>
)}
{description && (
<div className="color-fg-muted f4" dangerouslySetInnerHTML={{ __html: description }} />
)}
{children}
</div>
)
}