Reputation: 610
material-ui
popper to show a list of avatars. <Popper style={{ display: 'flex', maxWidth: '200px', }}>
<div style={{ marginRight: '20px' }}><Avatar /></div>
<div style={{ marginRight: '20px' }}><Avatar /></div>
</Popper>
I need a maxWidth. because I don't want popper to grow longer.
Looking like this right now:
Upvotes: 0
Views: 68
Reputation: 5411
You can add flex-wrap: wrap
(flexWrap: 'wrap'
) to the code, so It will go to the next line everytime the items occupy the full width.
<Popper style={{ display: 'flex', maxWidth: '200px', flexWrap: 'wrap' }}>
<div style={{ marginRight: '20px' }}><Avatar /></div>
<div style={{ marginRight: '20px' }}><Avatar /></div>
</Popper>
Upvotes: 1