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

Loosening ResponsiveStyleValue to accept false #1499

merged 1 commit into from Feb 14, 2021


Copy link

@ed0wolf ed0wolf commented Feb 13, 2021

I have a bunch of code that does something like:

sx={{ margin: [0, isTrue && 4] }}

The current types don't allow this because isTrue && 4 resolved to type false | number and false is not accepted as ResponsiveStyleValue. With the current types you need to write isTrue ? 4 : undefined.

Any chance we could loosen the types to allow for this kind of short form?

Copy link

vercel bot commented Feb 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect:
✅ Preview:

Copy link

Seems good to me!

Copy link

Thanks for the PR, @ed0wolf.
I'm gonna merge it in a moment, update changelog and release it as part of 0.6.0-alpha.7.

@hasparus hasparus added types enhancement New feature or request labels Feb 14, 2021
@hasparus hasparus merged commit 218fccf into system-ui:develop Feb 14, 2021
hasparus added a commit that referenced this pull request Feb 14, 2021
@ed0wolf ed0wolf deleted the patch-1 branch February 17, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
enhancement New feature or request types
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants