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

Default variants are being ignored when "responsively applying variants" #492

Closed
peduarte opened this issue Mar 15, 2021 · 3 comments
Closed
Labels
bug Something isn't working fixed: pending release P1

Comments

@peduarte
Copy link
Contributor

peduarte commented Mar 15, 2021

Say I have a Button with two color variants:

  • blue
  • red

I use defaultVariants and make the blue variant the default color.

Then, I render my Button, and set it to use violet on bp1:

<Button color={{ bp1: 'blue' }} />

I would expect that by default the Button uses the blue color variant (initially)

Outcome: Default variant is not applied

Repro: https://codesandbox.io/s/tender-bhaskara-x41n0?file=/src/App.js

@peduarte peduarte added beta bug Something isn't working P1 labels Mar 15, 2021
@ruijdacd
Copy link

I believe this might also be related to #483, which is causing responsive variants to not work as expected.

@peduarte
Copy link
Contributor Author

Fixed. Will be out in the next release.

https://codesandbox.io/s/distracted-franklin-ydx5w?file=/package.json

@jonathantneal jonathantneal mentioned this issue Jun 14, 2021
@peduarte
Copy link
Contributor Author

This fix has now been released 🚀

Release post: https://stitches.dev/blog/stitches-0.2.0

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed: pending release P1
Projects
None yet
Development

No branches or pull requests

2 participants