Repository navigation
Enhancement: Added Sliding Toggle Animation to Theme Switcher #170
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
Changes from 3 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
73a01f4
added a sliding ui effect for theme switcher button
codevory 5dba35b
refactor(theme-switch): address review feedback
codevory 932e8ca
fix(theme-switch): render both icons to enable sliding animation
codevory 482289c
refactor(glass-switch): apply DRY styles and finalize reusable switch
codevory f8b22a3
Merge branch 'modified' of https://github.com/codevory/Img2Num into m…
codevory 315bb2d
fix(glass-switch): restore icon animation after merge
codevory 1c19a89
fixed some issues & added sliding effect
codevory 2fb7fd3
feat(glass-switch): finalize reusable switch with tests and accessibi…
codevory 0fceedf
docs: add GlassSwitch component documentation
codevory 6c71168
fixed changes suggested by coderabbit
codevory 8dd1fc6
refactor(theme-switch): move theme logic back into ThemeSwitch to fol…
codevory 5aa1782
removed unused code & rendered themeswitch only
codevory 10bff81
added isRequired to isOn
codevory 04e5f43
Update @tanstack/react-query to the latest stable version (5.90.12).
codevory 93243ff
added size , disabled props that are optional
codevory 57d911f
improved documentation for GlassSwitch resuable component
codevory db1b191
Added documentation for GlassSwitch component including it's tests
codevory 9420f7a
Improved documentation as per it's usage & also modified it's test do…
codevory 77d21c4
Added a fallback Content when no thumbContent is given to component
codevory f282c8f
Improved the tests for GlassSwitch component to address changes
codevory 8b40a92
Added useful comments back
codevory ca45667
Improved tests for ThemeSwitch component & Adresed the required chang…
codevory bc713b2
modified documentation to ease the usage
codevory b002b52
Fixed missing focus indicator in GlassSwitch component.
codevory 3e27294
Fixed extra space issue
codevory 8cf481c
Merge branch 'main' into modified
codevory 436d68d
feat(GlassSwitch): improve styles
Ryan-Millard eaefe45
removed size props as is not being used
codevory aad2c22
Merge branch 'modified' of https://github.com/codevory/Img2Num into m…
codevory 856c8c3
fixed table formating issue
codevory 07dbafb
Fixed react node issue in classname
codevory dcd0ebc
Merge branch 'main' into modified
Ryan-Millard fb0b19f
style(react: GlassSwitch, ThemeSwitch): format GlassSwitch and ThemeS…
Ryan-Millard 0de229d
docs(react: GlassSwitch): fix wording
Ryan-Millard 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,70 @@ | ||
| .themeButton { | ||
| .themeButton{ | ||
| width:60px; | ||
| height:30px; | ||
| border-radius: 9999px; | ||
| padding: 0.5rem 0.75rem; | ||
| transition: all 0.2s ease-in-out; | ||
| padding-inline: 8px; | ||
| transition: transform 0.2s ease-in-out; | ||
| border: none; | ||
| margin: 0px 0.875rem; | ||
| cursor: pointer; | ||
| position:relative; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .themeButtonLight{ | ||
| background-color: #1a001f; | ||
| } | ||
|
|
||
| .themeButtonDark{ | ||
| background-color: #ddd9d9; | ||
| } | ||
|
|
||
| .themeButton:hover .icondark { | ||
| color: rgb(220, 220, 220); | ||
| } | ||
|
|
||
| .themeButton:hover .icon { | ||
| color: #1a001f; | ||
| } | ||
|
|
||
| .themeButton:hover { | ||
| .icon { | ||
| color: var(--color-secondary); | ||
| } | ||
| transform: scale(1.05); | ||
| cursor: pointer; | ||
| transform: scale(1.02); | ||
| } | ||
|
|
||
|
|
||
| .icon { | ||
| height: 1.25rem; | ||
| width: 1.25rem; | ||
| height: 1.3rem; | ||
| width: 1.3rem; | ||
| color: var(--color-primary); | ||
| transition: color 0.2s ease-in-out; | ||
| transition: transform 0.2s ease-in-out, color 0.2s ease-in-out; | ||
| } | ||
| .icondark{ | ||
| height: 1.3rem; | ||
| width: 1.3rem; | ||
| color: var(--color-primary); | ||
| transition: transform 0.2s ease-in-out, color 0.2s ease-in-out; | ||
| } | ||
|
|
||
| .themeButtonLight .icon{ | ||
| transform: translateX(0); | ||
| } | ||
| .themeButtonLight .icondark{ | ||
| transform: translateX(100%); | ||
| } | ||
|
|
||
| .themeButtonDark .icon{ | ||
| transform: translateX(-100%); | ||
| } | ||
| .themeButtonDark .icondark{ | ||
| transform: translateX(0); | ||
| } | ||
|
|
||
| @media (prefers-reduced-motion: reduce) { | ||
| .icon, | ||
| .icondark, | ||
| .themeButton { | ||
| transition: none; | ||
| } | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the comments back to this file. They are important (especially the JSDoc comments).