Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

353
Views
En material ui versión 5, el componente de cuadrícula no se estira

Estoy tratando de estirar el componente de cuadrícula cuando uno de los componentes de la tarjeta tiene texto adicional.

Encuentre el código de muestra aquí:

https://codesandbox.io/s/mediacard-demo-material-ui-forked-xpme4r?file=/demo.js:283-290

Cuando cambio los elementos de alineación a "flex-end" o "center", funciona.

Pero alignItems: "estirar" no funciona.

Uso de la versión 5 de MUI

Cualquier sugerencia sería útil.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El problema está resuelto. Agregué las alturas a la tarjeta y la hice receptiva. Podría ser útil para usted.

 import React from "react"; import { Grid, Card } from "@mui/material"; import CardActions from "@mui/material/CardActions"; import CardContent from "@mui/material/CardContent"; import { makeStyles } from "@mui/styles"; const useStyles = makeStyles((theme) => ({ stretch: { height: "100%" } })); export default function MediaCard() { const classes = useStyles(); return ( <Grid container spacing={3} justify="space-between" alignItems="stretch"> <Grid item xl={2} lg={2} md={6} xs={12}> <Card className={classes.stretch}> <CardContent>Card A</CardContent> <CardActions> Card A action // Card A actions // Card A actions //Card A actions// Card A actionsactions// Card A actionsactions// Card A actionsactions// Card A actions </CardActions> </Card> </Grid> <Grid item xl={2} lg={2} md={6} xs={12}> <Card className={classes.stretch}> <CardContent> Card B content</CardContent> <CardActions> Card B actions</CardActions> </Card> </Grid> <Grid item xl={2} lg={2} md={6} xs={12}> <Card className={classes.stretch}> <CardContent>Card B content</CardContent> <CardActions> Card B actions</CardActions> </Card> </Grid> </Grid> ); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!