I'm making a blog app using React, Material UI and Tailwindcss.
I made a grid of posts, but every postcard has a different height.
The question is: how to make all cards have the same height and all children in the same line?
Like This:

My Code: Posts.jsx:
function Posts({ posts }) {
  return (
    <div className="mt-10">
      <Container maxWidth="lg">
        <Grid
          container
          rowSpacing={8}
          columnSpacing={8}
          direction="row"
          justifyContent="center"
        >
          {posts.map((post, index) => (
            <Grid key={index} item xs={12} sm={12} md={6} lg={4}>
              <Card>
                <CardActionArea>
                  <div className="flex flex-col ">
                    <CardHeader
                      avatar={
                        <Avatar>{post?.username?.substring(0, 1)}</Avatar>
                      }
                      title={post?.username}
                      subheader={"date"}
                      subheaderTypographyProps={{
                        color: "primary.dark",
                      }}
                      color="primary.main"
                    />
                    <CardMedia
                      component="img"
                      height="194"
                      image={post?.photoURL}
                    />
                    <CardContent>
                      <Typography variant="h6" color="primary.main">
                        {post.description}
                      </Typography>
                    </CardContent>
                    <Divider variant="middle" className="bg-[#fcfcfc]" />
                    <CardActions>
                      <IconButton>
                        <MdFavorite className="text-red-500" />
                      </IconButton>
                    </CardActions>
                  </div>
                </CardActionArea>
              </Card>
            </Grid>
          ))}
        </Grid>
      </Container>
    </div>
  );
}
export default Posts;