flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Light mode tooltips use dark mode theme

Open lancegliser opened this issue 1 year ago • 2 comments

  • [X] I have searched the Issues to see if this bug has already been reported
  • [X] I have tested the latest version

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

lancegliser avatar Jun 26 '24 14:06 lancegliser

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

SutuSebastian avatar Jun 27 '24 08:06 SutuSebastian

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.

lancegliser avatar Jun 27 '24 13:06 lancegliser

Not a bug?

rluders avatar Aug 14 '24 16:08 rluders