I was using a Material UI button with a purple background.
<Button
component={Link}
to={link}
style={{
background: '#6c74cc',
borderRadius: 3,
border: 0,
color: 'white',
height: 48,
padding: '0 30px',
width: 200,
}}>
Attempting to change it to a styled-component:
export const StyledButton = styled(Button)`
background: #6c74cc;
border-radius: 3;
border: 0;
color: white;
height: 48;
padding: 0 30px;
width: 200px;
`;
However, the result is quite different. The background appears white and the text black, despite applying the same styles. Additionally, the width varies. How can I resolve this issue?