-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Faq): DOM validation fixed by setting the typography component to… (
#362) * fix(Faq): DOM validation fixed by setting the typography component to div * fix(NavigationTitle): trimes down the grid soup in navigationTitle makes only the arrow clickable and aligns it left instead of center * Restyled by prettier (#363) Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
- Loading branch information
1 parent
111c280
commit 181cbca
Showing
2 changed files
with
12 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import React from "react"; | ||
import { Grid, Typography } from "@material-ui/core"; | ||
import { Box, Typography } from "@material-ui/core"; | ||
import ArrowBackIosIcon from "@material-ui/icons/ArrowBackIos"; | ||
import { useQueryPreservingHistoryPush } from "app-config/components/customHistoryHooks"; | ||
|
||
export const NavigationTitle: React.FC<{ title: string; backToExpandedFeatureInfo?: boolean }> = (props) => { | ||
const customHistoryPush = useQueryPreservingHistoryPush(); | ||
|
||
return ( | ||
<a | ||
onClick={() => customHistoryPush("/", { expanded: props.backToExpandedFeatureInfo ? "true" : undefined })} | ||
style={{ textDecoration: "none", cursor: "pointer" }} | ||
aria-label="go back to map" | ||
> | ||
<Grid container direction="row" alignItems="center" style={{ marginTop: "8px" }}> | ||
<Grid item xs={1}> | ||
<ArrowBackIosIcon color="action" /> | ||
</Grid> | ||
<Grid item xs={11}> | ||
<Typography variant="h1">{props.title}</Typography> | ||
</Grid> | ||
</Grid> | ||
</a> | ||
<Box display="flex" flex={1} alignItems="center" style={{ marginTop: "8px", width: "100%" }}> | ||
<ArrowBackIosIcon | ||
style={{ textDecoration: "none", cursor: "pointer", padding: "8px" }} | ||
aria-label="go back to map" | ||
onClick={() => customHistoryPush("/", { expanded: props.backToExpandedFeatureInfo ? "true" : undefined })} | ||
color="action" | ||
/> | ||
<Typography variant="h1">{props.title}</Typography> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters