I'm getting this error:
JSX element type 'Button' does not have any construct or call signatures.ts(2604)
This is my styled component:
export const Button = styled.button<IStyledButtonProps>`
${(props) => `
background: ${props.secondary ? 'white' : '#1d9284;'};
color: ${props.secondary ? '#1d9284;' : 'white'};
`}
`;
This is the type:
export interface IStyledButtonProps {
readonly secondary?: boolean;
}
And this is the JSX:
<Button style={{ marginRight: '1em' }} secondary onClick={closeModal}>
Cancel
</Button>
I have not found any answers and I don't know what to try.