How can I use the Props
interface to type my react native Text
component props with styled components? When I do it like this I don't get any props typing.
interface Props { variant: TypeScaleVariant; color: ContentColor;}const Typography = styled.Text<Props>` font-weight: ${(props) => props.theme.typescale[props.variant].fontWeight}; font-size: ${(props) => props.theme.typescale[props.variant].fontSize}; line-height: ${(props) => props.theme.typescale[props.variant].lineHeight}; letter-spacing: ${(props) => props.theme.typescale[props.variant].letterSpacing}; color: ${(props) => props.theme.color[props.color]};`;Typography.defaultProps = { variant: 'bodyMedium', color: 'onSurface' };export default Typography;