Open bfanger opened 2 years ago
Hi, first of all this lib is a saviour.
Related to issue you mentioned above, I'm trying to use new Fluent UI React v9 and a bit stuck on how to use in svelte.
<CompoundButton icon={< CompoundIcon />} secondaryContent="Secondary content"> Example </ CompoundButton>
Icon is another react component and setting it gives an error "Unknown directive", and if I remove icon style is not applied...
By any chance, do you have any examples of how it can be used?
Thanks in advance!
@osmanium You can't use JSX inside a *.svelte file (yet) #16
JSX is a simple transformation, the <CompoundIcon />
transforms into React.createElement(CompoundIcon, null)
Try https://babeljs.io/repl for complexer JSX transformations.
I don't have examples of Fluent UI
The <react:CompoundButton icon={React.createElement(CompoundIcon, null)} >Example</react:CompoundButton>
is valid syntax for inside a svelte file.
Would be nice if the props and events would be typed