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

@emotion/styled and union with preseted field value #3135

Open
FoZzTH opened this issue Dec 1, 2023 · 0 comments
Open

@emotion/styled and union with preseted field value #3135

FoZzTH opened this issue Dec 1, 2023 · 0 comments

Comments

@FoZzTH
Copy link

FoZzTH commented Dec 1, 2023

Current behavior:

Cannot select a value specified in union type other than the second value in the union.

To reproduce:

  1. Create A component with props which use props with union which have same field with different setted value
  2. Try to style A component through @emotion/styled and destructure the props in functional way:
    const StyledA = styled(A)({ theme } => {...})

To see reproduce example please visit sandbox:
https://codesandbox.io/p/sandbox/effector-styled-bug-srcqsw

Expected behavior:

Any allowed value in the union can be selected in styled component.

Environment information:

  • react version: 18.2.0
  • @emotion/react version: 11.11.1
  • @emotion/styled version: 11.11.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant