1
0
mirror of synced 2025-12-22 19:34:15 -05:00
Files
docs/components/landing/LandingSection.tsx
Kevin Heis 567652b0e3 Primer 18 b (#22462)
* Create migrate-colors-primer-18.js

* Update colors round 1

* upgrade primer packages

* Update index.scss

* Replace auto colors

* remove btn-primary-matte

* Turns out the class names and variables names DONT LINE UP... ugh....

* Check for allowed var colors
2021-10-28 19:17:23 +00:00

31 lines
827 B
TypeScript

import cx from 'classnames'
type Props = {
title?: React.ReactNode
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', className)} id={sectionLink}>
{title && (
<h2 className={cx('h1 color-fg-default', !description ? 'mb-3' : 'mb-4')}>
{sectionLink ? (
<a className="color-unset" href={`#${sectionLink}`}>
{title}
</a>
) : (
title
)}
</h2>
)}
{description && (
<div className="color-fg-muted f4" dangerouslySetInnerHTML={{ __html: description }} />
)}
{children}
</div>
)
}