-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecff811
commit d2216c0
Showing
13 changed files
with
215 additions
and
25 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,7 @@ | |
position: absolute; | ||
bottom: -1.6rem; | ||
} | ||
|
||
[data-theme='dark'] .segment .percentile { | ||
color: hsl(0, 0%, 6%); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.themeSwitcher { | ||
position: relative; | ||
height: 1.85rem; | ||
width: 1.9rem; | ||
} | ||
|
||
.themeSwitcher img { | ||
object-fit: contain; | ||
} | ||
|
||
[data-theme='dark'] .themeSwitcher img { | ||
-webkit-filter: invert(90%); | ||
filter: invert(90%); | ||
} |
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,22 @@ | ||
'use client'; | ||
import moonSVG from '@/public/icons/moon.svg'; | ||
import sunSVG from '@/public/icons/sun.svg'; | ||
import { useTheme } from 'next-themes'; | ||
import Image from 'next/image'; | ||
import styles from './ThemeSwitcher.module.css'; | ||
|
||
export default function ThemeSwitcher() { | ||
const { theme, setTheme } = useTheme(); | ||
|
||
return ( | ||
<button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}> | ||
<div className={styles.themeSwitcher}> | ||
<Image | ||
src={theme === 'light' ? sunSVG : moonSVG} | ||
alt="Theme Switcher" | ||
fill | ||
/> | ||
</div> | ||
</button> | ||
); | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.