I'm currently working with the styled
api provided by emotion
in order to create a custom styled button.
const StyledButton = styled(Button)`
background-color: ${theme.palette.grey['800']};
width: 50;
height: 50;
&:hover {
background-color: ${theme.palette.grey['600']};
}
& .MuiButton-label {
color: #fff;
}
`;
However, I am encountering an issue when showcasing this in Storybook as the styling only shows up on the initial render of the component.
Subsequently, when switching between components, the applied styling vanishes (both from computed properties and visual display).
The styling comes back into view once I refresh the page... Any suggestions on how to tackle this?