-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
fix(togglebutton component): fix togglebutton with long label in mobile #1199
fix(togglebutton component): fix togglebutton with long label in mobile #1199
Conversation
…le view Fixed display of component with large label on mobile devices fix themesberg#884
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1199 +/- ##
==========================================
- Coverage 99.54% 97.36% -2.18%
==========================================
Files 163 214 +51
Lines 6621 9077 +2456
Branches 401 530 +129
==========================================
+ Hits 6591 8838 +2247
- Misses 30 239 +209 ☔ View full report in Codecov by Sentry. |
@SutuSebastian can you please check my pr? |
src/components/ToggleSwitch/theme.ts
Outdated
sm: 'w-9 h-5 after:absolute after:top-[2px] after:left-[2px] after:h-4 after:w-4', | ||
md: 'w-11 h-6 after:absolute after:top-[2px] after:left-[2px] after:h-5 after:w-5', | ||
lg: 'w-14 h-7 after:absolute after:top-0.5 after:left-[4px] after:h-6 after:w-6', | ||
sm: 'w-9 h-5 after:absolute after:top-[1px] after:left-[2px] after:h-4 after:w-4', |
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.
modifying the offset values makes the toggle switch look off
@@ -10,7 +10,7 @@ export const toggleSwitchTheme: FlowbiteToggleSwitchTheme = { | |||
label: 'ml-3 text-sm font-medium text-gray-900 dark:text-gray-300', | |||
}, | |||
toggle: { | |||
base: 'toggle-bg rounded-full border group-focus:ring-4 group-focus:ring-cyan-500/25', | |||
base: 'relative shrink-0 toggle-bg rounded-full border group-focus:ring-4 group-focus:ring-cyan-500/25', |
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.
adding just a relative
is enough
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.
src/components/ToggleSwitch/theme.ts
Outdated
sm: 'w-9 h-5 after:absolute after:top-[2px] after:left-[2px] after:h-4 after:w-4', | ||
md: 'w-11 h-6 after:absolute after:top-[2px] after:left-[2px] after:h-5 after:w-5', | ||
lg: 'w-14 h-7 after:absolute after:top-0.5 after:left-[4px] after:h-6 after:w-6', | ||
sm: 'w-9 h-5 after:absolute after:top-[1px] after:left-[2px] after:h-4 after:w-4', |
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.
we also need min-w-
values for all the sizes, this way it will never shrink below the size
|
WalkthroughThe recent updates focus on enhancing the Changes
Assessment against linked issues
Possibly related issues
Poem
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review due to trivial changes (1)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@SutuSebastian sorry for late update) I fix comments now |
deprecated by #1428 |
Fixed display of component with large label on mobile devices
fix #884 and fix #587
Fixed the display of the component with a large label on mobile devices. Now it does not collapse and is displayed correctly
#587
#884
Summary by CodeRabbit
New Features
ToggleSwitch
component with a new story for testing long labels.Style Updates
ToggleSwitch
component styles to improve layout and sizing across small, medium, and large sizes.