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

Shift not overruled by larger breakpoint? #67

Closed
0x80 opened this issue Apr 12, 2017 · 4 comments
Closed

Shift not overruled by larger breakpoint? #67

0x80 opened this issue Apr 12, 2017 · 4 comments
Labels

Comments

@0x80
Copy link

0x80 commented Apr 12, 2017

In the flowing code, the shift is not 0 at md and above. Am I misunderstanding the API? I would expect the shift only to occur from sm to md.

<Row divisions={9} debug>
  <Column md={3}>column 1</Column>
  <Column md={3}>column 2</Column>
  <Column md={3} mdShift={0} smShift={1}>column 3</Column>
</Row>
@AriTheElk
Copy link
Owner

AriTheElk commented Apr 12, 2017

Thanks for the issue report! This is actually a bug, mdShift is not overriding smShift because the value for mdShift is 0, which is equal to no value. Since hedron thinks there's no value set for mdShift, it doesn't override smShift. A workaround for now would be to use a string value for mdShift.

Like this: https://www.webpackbin.com/bins/-KhYZwKLLE0C5JuNjHik

It's going to spit out a warning when you're in development mode (since it's expecting a number, not a string). But in production mode there will be no error (since PropTypes aren't used in production).

This issue is not present in hedron >1.0.0 (installable via hedron@next), since the shift property can accept strings, numbers, and objects.

@AriTheElk AriTheElk added the bug label Apr 12, 2017
@0x80
Copy link
Author

0x80 commented Apr 12, 2017

I was just playing around but it's good to know that the behavior I was expecting was correct. I will switch to 1.0 now, since that one seems to have a lot of improvements in general 👍

@AriTheElk
Copy link
Owner

It's not fully documented yet, but you can view the 1.0.0 storybook here. It's still under heavy development, so if you have any questions or comments for us don't hesitate to reach out either on here or in our slack group

@AriTheElk AriTheElk mentioned this issue Sep 6, 2018
@AriTheElk
Copy link
Owner

This was resolved via 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants