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}

) : variant === 'h2' ? (

{children}

) : variant === 'h3' ? (

{children}

) : variant === 'h4' ? (

{children}

) : variant === 'h5' ? (
{children}
) : variant === 'h6' ? (
{children}
) : variant === 'p' ? (

{children}

) : (

{children}

)} ); }; export default Typography;