Hello,
For my reactive application, I have a button that have a few variables that affect whether it is enabled or not. Currently, I am changing the color of the button based on the those few variables. Is it possible to simplify it and just change the color of the button based on whether it is enabled or not? Thank you!
Hi, If you inspect your disabled button in Chrome dev tools for example, you'll see that OutSystems styles disabled buttons using this css:.btn[disabled] { background-color: var(--color-neutral-2); ... color: var(--color-neutral-6); }So, you could put that same CSS in your own theme, using your own colours.Or add a class name to the CSS rule to only target buttons with, for example, the class 'mybutton' on it:.btn.mybutton[disabled] { background-color: var(--color-neutral-2); ... color: var(--color-neutral-6); }
Thank you, didnt know the trick with Chrome dev tools to see the properties of a button. Thank you for your help on this !