Skip to content

Commit

Permalink
Polish switches 🇵🇱 (#84)
Browse files Browse the repository at this point in the history
* Change config switches to checkboxes in accordance with this article: https://uxplanet.org/checkbox-vs-toggle-switch-7fc6e83f10b8
* Change switches color to secondary blue
  • Loading branch information
JosephMarinier authored Jun 3, 2022
1 parent aad15c0 commit c6defba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions webapp/src/components/Controls/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ const Controls: React.FC<Props> = ({
control={
<Switch
checked={postprocessing.withoutPostprocessing ?? false}
color="secondary"
onChange={(_, checked) =>
handlePostprocessingChange(checked)
}
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
Box,
Button,
Checkbox,
Container,
FormControl,
FormControlLabel,
FormGroup,
FormHelperText,
Switch,
} from "@mui/material";
import React from "react";
import { useParams } from "react-router-dom";
Expand All @@ -32,7 +32,7 @@ const Settings: React.FC = () => {
const resultingConfig = { ...data, ...partialConfig };

const switchNullOrDefault = (field: keyof AzimuthConfig) => (
<Switch
<Checkbox
checked={Boolean(resultingConfig[field])}
disabled={isError || isFetching}
onChange={(_, checked) =>
Expand Down

0 comments on commit c6defba

Please sign in to comment.