Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
How would I make a MUI button take up the entirety of a Grid?

I have a Grid which needs to be a square that is responsive to window size, and inside this grid is a button which should take up the entirety of the grid. Currently, the grid resizes properly, but the contents inside of it do not take up the full size of the Grid. Here is my code

galleryButtonContainer: {
    width: '100%',
    height: 0,
    paddingBottom: '100%',
    borderRadius: '20%',
    backgroundColor: theme.palette.grey.light,
    '&:hover': {
      backgroundColor: theme.palette.grey.light,
    },
  },
  image: {
    objectFit: 'cover',
    width: '100%',
    height: '100%',
    borderRadius: '20%',
  },
  thumbnailIcon: {
    width: '50%',
    height: '50%',
  },
<Grid className={classes.galleryButtonContainer}>
  <Button
    onClick={() =>
      toPage(
        `/gallery/view/organizationEvent/${data.organizationEventId}`
      )
    }
  >
    {hasPhotos ? (
      <img
        src={thumbnail}
        alt="gallery thumbnail"
        className={classes.image}
      />
    ) : (
      <PhotoLibraryIcon className={classes.thumbnailIcon} />
    )}
  </Button>
</Grid>

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda