theme set via Customizations component does not match getTheme() theme

552 Views Asked by At

I apply themes from @uifabric/azure-themes or @uifabric/theme-samples via the Customization component.

However, once I change the theme, I noticed that the theme colors set by the Customization component do not match those retrieved from @uifabric/styling's getTheme().

Shouldn't they match once the Customization component (set at the top of my react tree) has been set with the new theme? All of the fabric react components seem to change color properly.

1

There are 1 best solutions below

1
On

A bit more fiddling and I created a hook that does what the decorator/styled-hoc does and it seems to work. A bit of extra work, but I guess getTheme() grabs something but whatever it is, it is not the same as going through the customizer even though the customizer should customize the current theme, at least in my thinking.