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
I've been trying to modify the look of the components.
This is my setup; I currently have a light and dark theme. It's set up in a data-theme style. It's working. I have a custom background colour I want to set for the buttons.
Then use that class name in the button's className. This works with both cssVariables false and true.
What is it that I am missing? I've been at this for a couple of hours. I thought it'd be straight forward modifying these unstyled headless UI components.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been trying to modify the look of the components.
This is my setup; I currently have a light and dark theme. It's set up in a data-theme style. It's working. I have a custom background colour I want to set for the buttons.
In global.css
In tailwind.config.js:
Now in the react components, I should be able to do this
But it's not working. The background of the button didn't change.
In component.json (cssVariables is set to true), tried it with false as well—both show the same result, no colour change.
However, it'll change if my do this in my CSS file
Then use that class name in the button's className. This works with both cssVariables false and true.
What is it that I am missing? I've been at this for a couple of hours. I thought it'd be straight forward modifying these unstyled headless UI components.
Beta Was this translation helpful? Give feedback.
All reactions