Added hotkeys + updated dependencies & webpack5 + humanetech badge (#15)
* Added language & theme switch hotkeys * Hotkeys testing * Language switch when equal * Shortcut keys changed * Dependencies updated & upgraded to webpack5 * Added HumaneTech badge * Disabled FLoC
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { FC } from "react";
|
||||
import { IconButton, useColorMode } from "@chakra-ui/react";
|
||||
import { SunIcon, MoonIcon } from "@chakra-ui/icons";
|
||||
import { useHotkeys } from "react-hotkeys-hook";
|
||||
|
||||
type Props = {
|
||||
[key: string]: any
|
||||
@@ -8,6 +9,7 @@ type Props = {
|
||||
|
||||
const ColorModeToggler: FC<Props> = (props) => {
|
||||
const { colorMode, toggleColorMode } = useColorMode();
|
||||
useHotkeys("ctrl+shift+l, command+shift+l", toggleColorMode, [toggleColorMode]);
|
||||
return (
|
||||
<IconButton
|
||||
aria-label="Toggle color mode"
|
||||
|
||||
Reference in New Issue
Block a user