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 1 commit
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
21 changes: 12 additions & 9 deletions packages/web/src/components/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import Box from "@material-ui/core/Box";
import IconButton from "@material-ui/core/IconButton";
import React from "react";
import Typography from "@material-ui/core/Typography";
Expand All @@ -14,15 +15,17 @@ const BackButton = ({ backButtonAction }: Props) => {
const history = useHistory();

return (
<IconButton
onClick={() =>
backButtonAction ? backButtonAction() : history.push("/")
}
size="small"
>
<Typography variant="srOnly">{t("backToPrevious")}</Typography>
<ArrowBackIcon fontSize="large" />
</IconButton>
<Box ml={2}>
<IconButton
onClick={() =>
backButtonAction ? backButtonAction() : history.push("/")
}
size="small"
>
<Typography variant="srOnly">{t("backToPrevious")}</Typography>
<ArrowBackIcon fontSize="large" />
</IconButton>
</Box>
);
};

Expand Down
10 changes: 8 additions & 2 deletions packages/web/src/components/PageBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,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 React from "react";
import { colors } from "@upswyng/common";

interface Props {
children: React.ReactNode;
color?: string;
Expand All @@ -26,7 +27,12 @@ const PageBanner = ({ children, color, backButtonAction }: Props) => {
<Grid item>
<BackButton backButtonAction={backButtonAction} />
</Grid>
<Grid item>{children}</Grid>

<List>
<ListItem>
<Grid item>{children}</Grid>
</ListItem>
</List>
</Grid>
</Box>
);
Expand Down