Closed amird308 closed 3 months ago
<Masonry alignColumns={true} columnsCount={3} gutter="10px">
{images.map((image, i) => (
<img
key={i}
src={image}
// set height of style form heights array randomly
style={{width: "100%", display: "block", height: [number]}}
/>
))}
</Masonry>
now you have align columns
If you have a few images that are taller than others, like this case: alignColumns can help us.
without alignColumns:
with alignColumns:
what if someone doesn't have height data with images ?
If I see it correctly, this library does not calculate the height of each children, but rather just splits children equally into separate columns. Probably this works for most of the people, but not for me. I end up with large column differences.
Sorry, I missed your PR. Could you rebase? I will merge and publish it. Thanks
Sorry, I missed your PR. Could you rebase? I will merge and publish it. Thanks
`
@amird308 There are still conflicts and I can't merge. Could you rebase please?
a little feature for make align columns