You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select component should apply error styling (red border and text) in dark mode.
What is actually happening?
Select component does not have error styling in dark mode.
Light mode has the expected styling.
What browsers are you seeing the problem on?
Chrome, Firefox
Any additional comments?
Not super familiar with the inner workings of the library, but it seems like <Select /> elements get their error styling from getSelectButtonColors in selectUtils.ts.
It seems this bug happens because the expressions for when hasError is true do not include dark: modifiers, so tailwind-merge does not overwrite any previously set dark:text-... and dark:border-... like here:
Tremor Version
3.17.2
Link to minimal reproduction
https://github.com/jmhoffmann9612/tremor-select-darkmode-error-bug
Steps to reproduce
npm run dev
/npx next dev
.localhost:3000
in browser.What is expected?
Select component should apply error styling (red border and text) in dark mode.
What is actually happening?
What browsers are you seeing the problem on?
Chrome, Firefox
Any additional comments?
Not super familiar with the inner workings of the library, but it seems like
<Select />
elements get their error styling fromgetSelectButtonColors
inselectUtils.ts
.tremor/src/components/input-elements/selectUtils.ts
Lines 47 to 48 in 3dc49f9
It seems this bug happens because the expressions for when
hasError
is true do not includedark:
modifiers, sotailwind-merge
does not overwrite any previously setdark:text-...
anddark:border-...
like here:tremor/src/components/input-elements/Select/Select.tsx
Line 125 in 3dc49f9
Patching the lines in
selectUtils.ts
fromto
with patch-package has worked in my project, but I so far cannot tell if this causes any unintended side effects.
The text was updated successfully, but these errors were encountered: