import React from 'react'; import classNames from 'classnames'; import { Text, TextTreatment, TextColor, TextFontFamily } from '../Text'; import './Divider.scss'; export type DividerProps = React.HTMLAttributes & { text?: string; treatment?: TextTreatment; color?: TextColor; family?: TextFontFamily; type?: 'no-line' | 'two-line' | 'line-above'; verticalPadding?: string; }; export const Divider: React.FC = ({ text, treatment, color, family, type, className, ...rest }) => { const defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5'; const defaultFamily = type === 'two-line' ? undefined : 'serif'; return (
{text && ( {text} )}
); };