1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Files
docs/components/ui/Lead/Lead.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

22 lines
578 B
TypeScript

import { ReactNode } from 'react'
import cx from 'classnames'
import styles from './Lead.module.scss'
export type LeadPropsT = {
children: string | ReactNode
className?: string
as?: keyof JSX.IntrinsicElements
}
export function Lead({ children, className, as: Component = 'div', ...restProps }: LeadPropsT) {
return (
<Component
className={cx('f2 color-fg-muted mb-3', styles.container, className)}
{...restProps}
{...(typeof children === 'string'
? { dangerouslySetInnerHTML: { __html: children } }
: { children })}
/>
)
}