-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Flowbite theme ThemeProps dark attribute does not change if false #581
Comments
This behavior I've noticed is actually happening because my default OS theme is dark mode. So when the
and see that my preference is dark mode on an OS level and then save that preference in |
I think intuitively if a developer sets |
…rk = false Found an issue where userpreferences when set to true overrides dark = false in theme props which is a confusing developer experience fix themesberg#581
@rluders I agree that userPreferences should be managed by the developer. I can make this change instead for my contribution |
This would be great @haron68 |
Fixes bug with dark = false not working. Removed usePreferences because of potential legal issues due to GDPR BREAKING CHANGE: ThemeProps no longer includes usePreferences fix themesberg#565, fix themesberg#581
* fix(flowbite themeprops): fix bug with user preferences overriding dark = false Found an issue where userpreferences when set to true overrides dark = false in theme props which is a confusing developer experience fix #581 * fix(theme): removed usePreferences Fixes bug with dark = false not working. Removed usePreferences because of potential legal issues due to GDPR BREAKING CHANGE: ThemeProps no longer includes usePreferences fix #565, fix #581 * refactor(theme): refactor useThemeMode Refactored useThemeMode to fetch context state * refactor(theme): improve readability improve readability and fix merge conflicts. Update documentation for ThemePage #565 * refactor(theme): remove === check for false to set light mode Since we're no longer using localStorage no need to hard check for false
Describe the bug
When using Flowbite component to create custom theme it does not accept
dark: false
. All rendered components use dark themeTo Reproduce
Steps to reproduce the behavior:
index.ts
orApp.tsx
<Flowbite>
custom theme component and wrap it around the app container. Setdark: false
in ThemeProps<html class="dark">
and all Flowbite components when used within the app render in dark modeExpected behavior
Flowbite components should render in light mode
System information:
Project information:
The text was updated successfully, but these errors were encountered: