import React from 'react'; import { useContext } from 'react'; import { ThemeContext } from '../theme-context/ThemeContext'; const Typography = (props: any) => { const { theme } = useContext(ThemeContext); const { children, variant, style } = props; const tempObj = { ...props }; delete tempObj.variant; delete tempObj.style; const htmlProps = { ...tempObj, }; //TODO //1, apply styles by class //2, apply size according with UI kit return ( <> {variant === 'h1' ? (
{children}
) : ({children}
)} > ); }; export default Typography;