themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.77k stars 395 forks source link

Light mode tooltips use dark mode theme #1438

Open lancegliser opened 4 days ago

lancegliser commented 4 days ago

Steps to reproduce

  1. Go to https://flowbite-react.com/docs/components/tooltip#trigger-type
  2. Click on "Tooltip click"
  3. Review classes

Current behavior

It appears there is a theme mismatch for tooltips in light mode. Image from: https://flowbite-react.com/docs/components/tooltip#theme

image

style.light should be: border border-gray-200 bg-white text-gray-900. style.auto should be: border border-gray-200 bg-white text-gray-900 dark:border-none dark:bg-gray-700 dark:text-white

The inspector seems to indicate that we're getting style.dark:

image

style.dark is bg-gray-900 text-white dark:bg-gray-700

Expected behavior

White background tooltips with dark text

SutuSebastian commented 3 days ago

I think there's a misunderstanding here, when we're talking about light, dark and auto tooltip we're talking about the style of it, not if we're in light or dark mode in tailwind.

Here's a screenshot of the flowbite Tooltip

Screenshot 2024-06-27 at 11 42 36

Now here's some screenshots of the flowbite-react Tooltip

Screenshot 2024-06-27 at 11 43 22

Notice the style prop

Screenshot 2024-06-27 at 11 43 37
lancegliser commented 3 days ago

I believe I did miss that. Apologies, it even is documented. Though, a couple concerns about even that:

The docs for that section state:

Use the style prop to change the style of the tooltip. The default style is light and you can also use dark.

That does not appear to be the default however:

image

I checked, and my flowbite-theme-mode is set to light.

I also wonder if the right default might be auto, though that's different than a bug.