neptunian / react-photo-gallery

React Photo Gallery
http://neptunian.github.io/react-photo-gallery/
Other
1.97k stars 310 forks source link

Add gap property to Gallery #215

Closed jaycincotta closed 2 years ago

jaycincotta commented 2 years ago

Could a gap property be added to Gallery?

Currently, Gallery accepts a margin property to add space around each elements in the gallery. Since margin is also applied to the external edges of the gallery, the gallery as a whole is offset from it's container. This is a general problem with grids and gap is perfect for internal margins.

An alternative to adding a new property would be to refine the semantics of the existing margin property to only apply to internal margins.

igordanchenko commented 2 years ago

You can work this around by applying negative margin to the gallery container.

You are also more than welcome to take a look at react-photo-album (npm, GitHub) since react-photo-gallery is no longer maintained.

jaycincotta commented 2 years ago

the link to react-photo-album is broken.

igordanchenko commented 2 years ago

Updated the links above.

jaycincotta commented 2 years ago

Found it! https://github.com/igordanchenko/react-photo-album

It looks like a brand new repo just started this week. Is that right, Igor?

igordanchenko commented 2 years ago

That doesn't sound right. The first release was published in December 2021.

jaycincotta commented 2 years ago

My bad. react-photo-album looks promising. I've opened a feature request on repo related to upgrading from react-photo-gallery