I\'m trying to extend styles for a react component using styled-components
but is not working.
AFAIK, I\'m doing it the right way, but perhaps I\'m missing somethin
As stated in documentation:
The styled method works perfectly on all of your own or any third-party components, as long as they attach the passed className prop to a DOM element.
Example
// This could be react-router-dom's Link for example, or any custom component
const Link = ({ className, children }) => (
{children}
);
const StyledLink = styled(Link)`
color: palevioletred;
font-weight: bold;
`;
render(
Unstyled, boring Link
Styled, exciting Link
);
Ref: https://www.styled-components.com/docs/basics#styling-any-component