-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add responsive gutter #6
Comments
Hi @bell-steven 👋🏻 sorry for the delay. It's a good idea. I think the best option is to add |
Totally agree. I would suggest that it be an entirely optional prop, with no set defaults, or default of 0. What is the reason for making the number value a string? |
The reason was that you can put "10px" or "1.5rem" for example depends of your preferences |
To help people avoid getting this error by using a number: Warning: Failed prop type: Invalid prop `gutter` of type `number` supplied to `Masonry`, expected `string`. Also to illustrate how to have responsive gutters because this was not obvious, see: #6 (comment)
To help people avoid getting this error by using a number: Warning: Failed prop type: Invalid prop `gutter` of type `number` supplied to `Masonry`, expected `string`. Also to illustrate how to have responsive gutters because this was not obvious, see: cedricdelpoux/react-responsive-masonry#6 (comment)
As a workaround, you can use CSS clamp():
|
why was this closed? the commits pushed to the documentation is unrelated to this functionality? |
PR's are welcome 🙂 You can add |
Hey,
This is a feature request for having the gutter size based on the media queries. Gutter is currently a string on the Masonry component, so there are a couple of ways to go about this. I don't mind doing the legwork if I can get some direction...
The text was updated successfully, but these errors were encountered: