Commit 9cd266cd authored by tom's avatar tom

i am stupid

parent 6222efeb
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
height: 24px; height: 24px;
border-radius: 12px; border-radius: 12px;
position: absolute; position: absolute;
transform: translate(44px, 4px); transform: translate(4px, 4px);
} }
.thumb[data-checked] { .thumb[data-checked] {
transform: translate(4px, 4px); transform: translate(44px, 4px);
} }
.nightIcon { .nightIcon {
......
...@@ -27,14 +27,14 @@ export interface ColorModeTogglerProps ...@@ -27,14 +27,14 @@ export interface ColorModeTogglerProps
export const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref) => { export const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref) => {
const ownProps = omitThemingProps(props); const ownProps = omitThemingProps(props);
const { toggleColorMode } = useColorMode(); const { toggleColorMode, colorMode } = useColorMode();
const { const {
state, state,
getInputProps, getInputProps,
getCheckboxProps, getCheckboxProps,
getRootProps, getRootProps,
} = useCheckbox(ownProps); } = useCheckbox({ ...ownProps, isChecked: colorMode === 'light' });
const trackBg = useColorModeValue('blackAlpha.100', 'whiteAlpha.200') const trackBg = useColorModeValue('blackAlpha.100', 'whiteAlpha.200')
const thumbBg = useColorModeValue('white', 'black') const thumbBg = useColorModeValue('white', 'black')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment