import "./Typography.scss";

interface ITypographyProps {
  element: string;
  children: React.ReactNode;
}

const Typography: React.FC<ITypographyProps> = ({
  element,
  children,
}: ITypographyProps) => {
  const headers: Record<string, React.ReactNode> = {
    h2: <h2 className="typography-h2">{children}</h2>,
    h3: <h3 className="typography-h3">{children}</h3>,
  };
  return headers[element];
};

export default Typography;
