Skip to content

Add theme toggle feature #5

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
merged 1 commit into from
Aug 8, 2023
Merged

Add theme toggle feature #5

merged 1 commit into from
Aug 8, 2023

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 8, 2023

Description

This PR adds a theme toggle feature to the website. Users will be able to switch between light and dark themes by clicking on a button in the navigation bar.

Summary

  • Added a state to manage the theme using the useState hook in the layout component.
  • Implemented a function to toggle the theme state between 'light' and 'dark'.
  • Added a button to the navigation bar that calls the toggle function when clicked.
  • Used the theme state to dynamically change the classes of the components, allowing for the switch between light and dark themes.

Please review and merge these changes. Thank you!

Fixes #3.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/theme-toggle

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 8, 2023
@vercel
Copy link

vercel bot commented Aug 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ssl-checker 🔄 Building (Inspect) Visit Preview Aug 8, 2023 1:43am
ssl-checker-edla ❌ Failed (Inspect) Aug 8, 2023 1:43am
ssl-testify ❌ Failed (Inspect) Aug 8, 2023 1:43am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sweep: make theme toggle code for this site
1 participant