Gleb
November 21, 2021, 1:33am
7
Please don’t use variants for icons. Never never ever!!!
@AshA @Sabri_Hakuli @Dmitrii_Denezhkin
This feature suggestion is still valid and useful, so I’m keeping it open, but I’m gonna mark this answer as a solution for visibility — so many people make this big mistake. More info:
Don’t use variants for icons, this is bad practice (and what you are showing is just one of the reasons why). Variants are supposed to be used for different states of one thing, not different entirely different things.
My rule of thumb for when to use variants for icons is: never. In the example above, what’s shown as variants are different controls, not icons. They are things you can toggle, they are interchangeable. Ignoring the obvious example like a radio button and a checkbox, the sound on/off icons work as a button in this case, so they may have different color and styling depending on whether or not they are toggled. The stocks up/down icons can be green and yellow respectively. And in this case they do…