Notification bar

This commit is contained in:
J Francisco Rader committed 2020-08-22 05:19:35 -03:00
1 parent 205dcabf12
commit 68fd91d4d0
17 files changed
+191 -27

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
import React from "react";
import { makeStyles, Typography, Grid } from "@material-ui/core";
import { grey } from "@material-ui/core/colors";
import { fade } from "@material-ui/core/styles/colorManipulator";
import SignalIcon from "@material-ui/icons/SignalCellular3Bar";
const useStyles = makeStyles(() => ({
root: {
backgroundColor: fade(grey[800], 0.7),
height: "25px",
width: "100%",
color: "white",
},
item: {
margin: "0 6px",
},
text: {
position: "relative",
bottom: "2px",
},
}));
export const NotificationBar = ({ notifications = [] }) => {
const classes = useStyles();
return (
<Grid
className={classes.root}
container
justify="space-between"
wrap="nowrap"
>
<Grid container item wrap="nowrap">
{notifications.map((n) => (
<Grid item className={classes.item}>
{n}
</Grid>
))}
</Grid>
<Grid container item wrap="nowrap" justify="flex-end">
<Grid item>
<SignalIcon fontSize="small" />
</Grid>
<Grid item className={classes.item}>
<Typography
className={classes.text}
variant="button"
color="white"
>{`AT&T`}</Typography>
</Grid>
</Grid>
</Grid>
);
};
+5
View File
@@ -0,0 +1,5 @@
import React from "react";
export const NotificationIcon = ({ Icon }) => {
return <Icon fontSize="small" />;
};