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

Getting warning on setting variant options default as true when using BooleanVariant #85

Open
wypratama opened this issue Apr 13, 2023 · 2 comments
Assignees

Comments

@wypratama
Copy link

wypratama commented Apr 13, 2023

I keep getting this error
Type 'true' is not assignable to type 'string | { dark?: string | undefined; light?: string | undefined; initial?: string | undefined; } | undefined'

when trying to set the default option for BooleanVariant. have been trying tweak here and there and haven't been able to find a way to fix it. Is this supposed to happen and I'm missing something in the code? Can anyone help?

this is my code:

css({
  variants: {
    primary: {
      true: {
        background: '{color.primary.500}'
      },
      false: {
        background: 'red'
      },
      options: {
        default: true
      } 
    }
  }
})

Type 'true' is not assignable to type 'string

@SGAMERyu
Copy link
Contributor

Can you provide a minimal reproduction repository? I couldn't reproduce the issue in my local project.

@wypratama
Copy link
Author

hi @SGAMERyu, I basically set up my project with takeover mode enabled. I tried to make a running reproduction here
https://stackblitz.com/~/github.com/wypratama/reproduce-pinceau-error
from this repository:
https://github.com/wypratama/reproduce-pinceau-error
but i'm not sure if i've done it correctly.

wypratama added a commit to wypratama/pinceau that referenced this issue Apr 16, 2023
wypratama added a commit to wypratama/pinceau that referenced this issue May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants