I needed to adjust the size of a Font-Awesome component in React.js based on different media queries. How can we change the size of the Font-Awesome component dynamically according to the screen size?
export const Revenue = (props) => (
<div className={classes.Div}>
<div>
<FontAwesomeIcon
style={{ marginTop: "20px" }}
size="3x" // @media(max-width: 415px) { size= 2x} and 3x for other
icon={faDollarSign}
color="#01CBC6"
/>
</div>
<div
className={classes.SmallDiv}
style={{
display: "flex",
flexDirection: "column",
}}
>
<h3>{props.data.totalRevenue}</h3>
<p>Total Revenue</p>
</div>
</div>
);