I am constructing a customized gutenberg block that ought to have a dropdown (SelectControl) to pick out which css class needs to be added to my block. Up to now, nothing particular. My downside is that relying on the theme I am utilizing, the obtainable courses change.
So for ThemeA, the obtainable courses are "test1, test2, test3" and for ThemeB "test2, test4".
So how can my theme inform my block which courses can be found?
I am considering of an answer through which my theme forwards the courses to my block.
However I can not discover any hooks or different wordpress features to inject knowledge from my theme into my editor js frontend (into my SelectControl).
Variants are not any possibility as a result of the obtainable courses change. I’ve an answer how one can apply the courses to my block, I simply do not know the way the prolong the SelectControl within the InspectorControls.