* 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
22 lines
578 B
TypeScript
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 })}
|
|
/>
|
|
)
|
|
}
|