Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please add banner style updates V2 #507

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/web/src/components/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const BackButton = ({ backButtonAction }: Props) => {
backButtonAction ? backButtonAction() : history.push("/")
}
size="small"
edge="start"
>
<Typography variant="srOnly">{t("backToPrevious")}</Typography>
<ArrowBackIcon fontSize="large" />
Expand Down
21 changes: 13 additions & 8 deletions packages/web/src/components/PageBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import BackButton from "./BackButton";
import BannerColorContext from "./BannerColorContext";
import Box from "@material-ui/core/Box";
import Grid from "@material-ui/core/Grid";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemIcon from "@material-ui/core/ListItemIcon";
import ListItemText from "@material-ui/core/ListItemText";
import React from "react";
import { colors } from "@upswyng/common";

Expand All @@ -21,13 +24,15 @@ const PageBanner = ({ children, color, backButtonAction }: Props) => {
}, [color, updateCurrentBannerColor]);

return (
<Box bgcolor={currentBannerColor || colors.black} mb={4} py={2}>
<Grid container wrap="nowrap" alignItems="center" spacing={1}>
<Grid item>
<BackButton backButtonAction={backButtonAction} />
</Grid>
<Grid item>{children}</Grid>
</Grid>
<Box bgcolor={currentBannerColor || colors.black} mb={4}>
<List disablePadding>
<ListItem>
<ListItemIcon>
<BackButton backButtonAction={backButtonAction} />
</ListItemIcon>
<ListItemText>{children}</ListItemText>
</ListItem>
</List>
</Box>
);
};
Expand Down