I have been using styled components but there is a case where i had to add a font awesome icon and then add some css like font-size and color etc .I tried with the following approach but the css doesn't get applied to it.
IconComponent.js
import styled from "styled-components";
const NavIcon = () => {
return <i className="fas fa-bars"></i>;
};
const NavIconDisplay = styled(NavIcon)`
color: white;
display: none;
font-size: 20px;
`;
export {NavIconDisplay}
App.js import {NavIconDisplay} from './IconComponent'
<NavIconDisplay/>
but then i see the styling color:white and all doesnt get added to it, even when i inspect it there seems no class added to it as the styled components usally add (some random class names) to the elements