We want to set color of some text in the widget to selected theme's color, is their any way we can get selected Theme's Style(Color) in widget .
Thanks,
Sumit
Sumit,
Sure use this.
requires
'dojo/_base/query', 'dojo/dom-style' dojoQuery, domStyle var node = dojoQuery('.jimu-main-background')[0]; console.info(domStyle.get(node, 'background-color'));
Sumit,
First,you can access a style array from `this.appConfig`, the first one as the selected style. If there doesn't have styles property, use `default` as default.
Second, you should send a request to get the manifest.json of theme manually.
The `styleColor` is you need.
Thanks ZeZheng Li !
We have already tried this and it is working fine.We thought this would be an workaround and will have maintenance impact if any changes in WAB carried out in feature.
Is their any other way by which we can get the selected Style (color), without implementing this workaround.
For e.g. It would be good if WAB provide the selected style(color) along with the style name.