Wrapper every 3 items in a listing

Asked

Viewed 23 times

0

I have an api that returns me a list of customers and I have the following layout, my question is how to put the light gray bg div every 3 items. Just follow my code.

<Grid container justify="flex-start" spacing={2}>
  {data.map((profile) => (
    <Grid item xs={12} sm={6} md={4}>
      <CardProfile profile={profile} />
    </Grid>
  ))}
</Grid>

inserir a descrição da imagem aqui

  • where you took this Grid that is, these components?

  • is of the material-ui https://material-ui.com/pt/components/grid/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.