Merge pull request #480 from wael-mohamed/master

The icons' colours are hardcoded in the SVG files
This commit is contained in:
Dominik Żegleń 2020-05-11 19:00:54 +02:00 committed by GitHub
commit dc291eb9c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View file

@ -76,8 +76,10 @@ const useStyles = makeStyles(
margin: 0 margin: 0
}, },
icon: { icon: {
color: theme.palette.primary.main, fontSize: 48,
fontSize: 48 "& path":{
fill:theme.palette.primary.main,
}
}, },
sectionDescription: {}, sectionDescription: {},
sectionTitle: { sectionTitle: {

View file

@ -34,7 +34,12 @@ const useStyles = makeStyles(
[theme.breakpoints.down("xs")]: { [theme.breakpoints.down("xs")]: {
gridTemplateColumns: "1fr" gridTemplateColumns: "1fr"
} }
} },
icon: {
"& path":{
fill:theme.palette.primary.main,
}
},
}), }),
{ name: "HomePage" } { name: "HomePage" }
); );
@ -86,7 +91,7 @@ const HomePage: React.FC<HomePageProps> = props => {
<div className={classes.cardContainer}> <div className={classes.cardContainer}>
<HomeAnalyticsCard <HomeAnalyticsCard
title={"Sales"} title={"Sales"}
icon={<Sales fontSize={"inherit"} viewBox="0 0 64 64" />} icon={<Sales className={classes.icon} fontSize={"inherit"} viewBox="0 0 64 64" />}
> >
{sales ? ( {sales ? (
<Money money={sales} /> <Money money={sales} />
@ -96,7 +101,7 @@ const HomePage: React.FC<HomePageProps> = props => {
</HomeAnalyticsCard> </HomeAnalyticsCard>
<HomeAnalyticsCard <HomeAnalyticsCard
title={"Orders"} title={"Orders"}
icon={<Orders fontSize={"inherit"} viewBox="0 0 64 64" />} icon={<Orders className={classes.icon} fontSize={"inherit"} viewBox="0 0 64 64" />}
> >
{orders === undefined ? ( {orders === undefined ? (
<Skeleton style={{ width: "5em" }} /> <Skeleton style={{ width: "5em" }} />