-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update to v4 of the squonk theme
- Loading branch information
1 parent
aac170d
commit 3d35345
Showing
9 changed files
with
92 additions
and
124 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Box, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup } from "@mui/material"; | ||
import { useColorScheme } from "@mui/material/styles"; | ||
|
||
/** | ||
* Displays a button which controls the theme of the application. | ||
*/ | ||
export const ColourSchemeSelection = () => { | ||
const { mode, setMode } = useColorScheme(); | ||
if (!mode) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
width: "100%", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
bgcolor: "background.default", | ||
color: "text.primary", | ||
borderRadius: 1, | ||
p: 3, | ||
minHeight: "56px", | ||
}} | ||
> | ||
<FormControl> | ||
<FormLabel id="demo-theme-toggle">Theme</FormLabel> | ||
<RadioGroup | ||
row | ||
aria-labelledby="demo-theme-toggle" | ||
name="theme-toggle" | ||
value={mode} | ||
onChange={(event) => setMode(event.target.value as "dark" | "light" | "system")} | ||
> | ||
<FormControlLabel control={<Radio />} label="System" value="system" /> | ||
<FormControlLabel control={<Radio />} label="Light" value="light" /> | ||
<FormControlLabel control={<Radio />} label="Dark" value="dark" /> | ||
</RadioGroup> | ||
</FormControl> | ||
</Box> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.