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

Sveltosis style directives & React generation #1246

Open
2 of 12 tasks
megan-starr9 opened this issue Jul 28, 2023 · 0 comments
Open
2 of 12 tasks

Sveltosis style directives & React generation #1246

megan-starr9 opened this issue Jul 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@megan-starr9
Copy link

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

https://mitosis.builder.io/?outputTab=E4UwhgxgLkA%3D&inputTab=M4NwpgNgLmQ%3D&code=DwZwxgTglgDgLgAgDYEMB2BzAvAIjiHAPgCgEEBTADxgHsJElzEwak6EsEByLgblIrU6DJggBGdACbkILNhA7c%2BAqrXrJRcKnDntOPfsAD04aPBLFgYgK5w4NNAJBwAnoywBvXQoD8CAAZiKGAA1hgQNNZokgC03gBcCAAkXqx0AL68%2FgiJPOlOrozxEhDSEHFpEJ4lZd75ZM5u5PHenlqUOpX1CA4tSFChxCRkoGxwhADC%2FaEIABYy5MYgYyTGNnYOJEA%3D%3D

Expected Behaviour

When styles are added using Svelte style directives, they should be reflected in the translated styles, just as class directives are.

Further, when styles are translated to React, they should be provided in an object and not a string. (Errors are thrown when trying to provide a string to the style prop)

Actual Behaviour

Style directives are left out of the translated code entirely and lost.

The style prop is provided to React as an untranslated string and breaks the build.

Additional Information

No response

@megan-starr9 megan-starr9 added the bug Something isn't working label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant