Styled(Component ) typesript type code example
Example: styled components props typescript
interface YourProps {
invalid: boolean
}
const Input = styled.input`
border: ${(p: YourProps) => p.invalid ? 'red' : 'blue'};
`
interface YourProps {
invalid: boolean
}
const Input = styled.input`
border: ${(p: YourProps) => p.invalid ? 'red' : 'blue'};
`