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

DarkThemeToggle component doesn't work when usePreferences is set to false #417

Closed
Bloodysunset opened this issue Oct 31, 2022 · 0 comments · Fixed by #424
Closed

DarkThemeToggle component doesn't work when usePreferences is set to false #417

Bloodysunset opened this issue Oct 31, 2022 · 0 comments · Fixed by #424
Labels
🐛 bug Something isn't working confirmed This bug was confirmed good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Bloodysunset
Copy link

Describe the bug
The DarkThemeToggle component's button is working only when usePreferences=true.

To Reproduce
Steps to reproduce the behavior:

  1. Set the theme like this:
<Flowbite
  theme={{
    usePreferences: false,
    theme: {
      darkThemeToggle: {
        base: 'text-gray-500 hover:text-gray-900 dark:hover:text-white',
      },
    },
  }}
>
...
</Flowbite>
  1. Add the DarkThemeToggle component:
<DarkThemeToggle />
  1. Click on the DarkThemeToggle's button
  2. Nothing happens

Expected behavior
We should be able to propose a default theme (white) and still allow users to change via the theme button.

Project information:

  • Tailwind: 3.2.0
  • Flowbite: 1.5.3
  • Flowbite React: 0.2.1
Bloodysunset added a commit to XavierChevalier/labeilleviennoise that referenced this issue Nov 2, 2022
@rluders rluders added 🐛 bug Something isn't working help wanted Extra attention is needed confirmed This bug was confirmed good first issue Good for newcomers labels Nov 3, 2022
XavierChevalier pushed a commit to XavierChevalier/flowbite-react that referenced this issue Nov 4, 2022
rluders pushed a commit that referenced this issue Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working confirmed This bug was confirmed good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants