import "./Typography.scss"; interface ITypographyProps { element: string; children: React.ReactNode; } const Typography: React.FC = ({ element, children, }: ITypographyProps) => { const headers: Record = { h2:

{children}

, h3:

{children}

, }; return headers[element]; }; export default Typography;