Closed TheSayantan96 closed 2 years ago
FWIW I had a similar use case and came here to search first, but was able to accomplish it on my own by pre-calculating how many children I would have:
<ResponsiveMasonry columnsCountBreakPoints={children.length === 1 ? { 0: 1 } : { 1023: 1, 1024: 2 }}>
<Masonry columnsCount={children.length === 1 ? 1 : undefined}>
{...children}
</Masonry>
</ResponsiveMasonry>
Not sure if this is the best/only approach but it works well for me
This is the best approach for now. Thanks @keegandonley
Is there a way we can make a single child horizontally center aligned?