Skip to content
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

docs: made themeToggleButton a toggle button #799

Merged
merged 5 commits into from
Nov 18, 2022

Conversation

muradbu
Copy link
Contributor

@muradbu muradbu commented Nov 18, 2022

Closes #781

βœ… Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

Changelog

Refactored themeToggleButton to use a <button> root element instead of 2 radio buttons so that the light/dark theme gets toggled regardless of where the user presses within the component.

The component's title, value and aria-label attributes gets set on page-load using the appropriate dark/light state.


Screenshots

theme toggle 3

πŸ’―

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2022

⚠️ No Changeset found

Latest commit: 468609b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 18, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
create-t3-app βœ… Ready (Inspect) Visit Preview Nov 18, 2022 at 11:58PM (UTC)

@github-actions github-actions bot added the πŸ“š documentation Improvements or additions to documentation label Nov 18, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2022

⚑️ Lighthouse report for the changes in this PR:

Category Score
🟒 Performance 100
🟒 Accessibility 100
🟒 Best practices 100
🟠 SEO 86
🟠 PWA 54

Lighthouse ran on https://create-t3-app-git-fork-muradbuyukasik-next-t3-oss.vercel.app/

Copy link
Member

@nexxeln nexxeln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great on my end

@juliusmarminge juliusmarminge enabled auto-merge (squash) November 18, 2022 23:58
@juliusmarminge juliusmarminge merged commit 87df823 into t3-oss:next Nov 18, 2022
devvianto605 pushed a commit to devvianto605/create-devviantex-nextjs-app that referenced this pull request Jun 9, 2024
* docs: made themeToggleButton a toggle button

* fix: more clear function name

Co-authored-by: Shoubhit Dash <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ“š documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: One button to toggle the theme instead of 2 radiobuttons
3 participants