Tahul / pinceau

🖌️ Make your <script> lighter and your <style> smarter
https://pinceau.dev
MIT License
684 stars 19 forks source link

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

Open wypratama opened 1 year ago

wypratama commented 1 year ago

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 commented 1 year ago

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

wypratama commented 1 year ago

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.