Theme Color bug ... or is it? (with Workaround)

Hi,

when using the ThemeColor property and you select color none the output in the console log is -500 and not an empty string that I would expect. Therefor I can not do logic with colors in case I do not set something.

Use case for SVG. If no color is selected in SVG it would become black. So I wanted to select color none and in the hook.js file check if the string is empty and if thats the case assign fill-transparent to my svg otherwise fill-brand-300 or what ever is selected.

As a workaround I check in the hook.js if the length of the string is smaller then 5.

Ahem, that’s a bug, sorry!

I’ve created a ticket for it to be fixed in a future build :saluting_face:

1 Like