I am new to the material UI. Here , I am trying to create a styled component which will be a Typography. So, what I tried is ,
import styled from 'styled-components';
import {
FormGroup,
FormControlLabel,
Tooltip,
FormControl,
Select,
Radio,
Typography,
Button
} from '@material-ui/core'
const StyledTypography = styled.Typography<Itest>(({ marginLeft, marginRight }) => ({
}))
But this gives me a compile time error.
Property 'Typography' does not exist on type 'ThemedStyledInterface<ThemeInterface>'
Can any one help me with this ?
I have used the folowing way
const StyledTypography = styled(Typography)<ISortBySelector>(({ fontSize }) => ({
&& {
fontFamily: 'Roboto',
fontSize: fontSize ? fontSize : '10px',
fontWeight: 'normal',
fontStretch: 'normal',
fontStyle: 'normal',
lineHeight: 'normal',
letterSpacing: fontSize ? '0.14px' : '0.07px',
width: fontSize ? '50px' : '35px',
height: fontSize ? '19px' : '14px',
color: '#000000',
cursor: 'pointer'
}
}))