-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Add dark mode support and fix GitHub repository links #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rishabh3562
merged 8 commits into
rishabh3562:main
from
aryadharmadhikari:feat/dark-theme
Oct 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eb0b766
feat: Add dark mode support and fix GitHub repository links
aryadharmadhikari d525935
fix: update tsconfig jsx setting and improve documentation
aryadharmadhikari 25ac639
refactor: update node version to 20.x in github workflow
aryadharmadhikari a5a57e2
fix: revert Next.js upgrade to maintain compatibility
rishabh3562 4de4dde
fix: exclude docs folder from TypeScript type checking
rishabh3562 e42b684
fix: add npm install step to deploy-preview job
rishabh3562 c7cc4b2
fix: use resolvedTheme instead of theme for toggle and revert to node…
aryadharmadhikari 196c37b
fix: wrap ThemeProvider in client component for Next.js App Router co…
rishabh3562 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
aryadharmadhikari marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,30 @@ | ||
| "use client"; | ||
|
|
||
| import * as React from "react"; | ||
| import { Moon, Sun } from "lucide-react"; | ||
| import { useTheme } from "next-themes"; | ||
|
|
||
| export function ThemeToggle() { | ||
| const [mounted, setMounted] = React.useState(false); | ||
| const { theme, setTheme } = useTheme(); | ||
|
|
||
| React.useEffect(() => { | ||
| setMounted(true); | ||
| }, []); | ||
|
|
||
| if (!mounted) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <button | ||
| onClick={() => setTheme(theme === "dark" ? "light" : "dark")} | ||
| className="relative inline-flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground transition-colors" | ||
| aria-label="Toggle theme" | ||
| > | ||
| <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" /> | ||
| <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" /> | ||
| <span className="sr-only">Toggle theme</span> | ||
| </button> | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.