Skip to content

Commit

Permalink
Tidy up switch
Browse files Browse the repository at this point in the history
  • Loading branch information
MurrayGroves committed Feb 26, 2024
1 parent 1d1af4a commit 27c4f9a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions saferoute/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Layer, Source } from "react-map-gl/maplibre";

import "./App.css";
import { Marker } from "react-map-gl/maplibre";
import { Paper, Switch, ToggleButton } from "@mui/material";
import { FormControlLabel, FormGroup, Paper, Switch, ToggleButton } from "@mui/material";

import { usePlacesWidget } from "react-google-autocomplete";
import { ClickableMap } from "./ClickableMap";
Expand Down Expand Up @@ -187,7 +187,12 @@ out;
/>
</Paper>

<Switch sx={{position: 'absolute', bottom: '1%', zIndex: '5'}} checked={weight} onChange={(e) => setWeight(e.target.checked)}></Switch>
<Paper sx={{ position: 'absolute', bottom: '2%', zIndex: '5', paddingLeft: '3%', paddingRight: '1%' }}>
<FormGroup >
<FormControlLabel control={<Switch checked={weight} onChange={(e) => setWeight(e.target.checked)} />} label={"Fastest/Safest"}/>
</FormGroup>
</Paper>


<ClickableMap
start={start}
Expand Down

0 comments on commit 27c4f9a

Please sign in to comment.