Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve VS Code support #1

Closed
bfanger opened this issue Jun 11, 2022 · 3 comments
Closed

Improve VS Code support #1

bfanger opened this issue Jun 11, 2022 · 3 comments

Comments

@bfanger
Copy link
Owner

bfanger commented Jun 11, 2022

Would be nice if the props and events would be typed

@osmanium
Copy link

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!

@bfanger
Copy link
Owner Author

bfanger commented Oct 18, 2022

@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.

bfanger added a commit that referenced this issue Oct 16, 2024
bfanger added a commit that referenced this issue Oct 19, 2024
- global types for sveltify & react, these values are imported or generated when used but not defined.
- Compatible with `<react:*` notation, but a deprecation warning
- PreProcessor injects react dependencies as second argument to sveltify.
- Added migration docs

Fixes #1 & #32
@bfanger
Copy link
Owner Author

bfanger commented Oct 19, 2024

Fixed in 2.0.0-next.8 (requires svelte 5)

@bfanger bfanger closed this as completed Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants