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

209
Vistas
Why the Grid Element Not Arranging The Typography

**i want to create a component which will have books in the responsive tabs but and I used material UI grid toh arrange them as per the screen Width , but I Dont Know what is did Wrong they should be arranged in 2 columns below is the code and Screen shot of my result **

  import React from 'react'
    import { Grid, Typography, Box, makeStyles } from "@material-ui/core"
    const useStyles = makeStyles({
        container: {
            width: "100%",
            border: "2px solid green",
            "& > *": {
                textAlign: "center"
            }
        },
        names: {
            display: "flex"
        }
    })
    function Books() {
        const classes = useStyles()
        return (
            <Box className={classes.container}>
                <Grid item lg={6}>
                    <Typography className={classes.names}>HEllo</Typography>
                    <Typography className={classes.names}>HEllo</Typography>
    
                </Grid>
            </Box>
        )
    }
    
    export default Books

the view of the component enter image description here

**I want them to arrange in 2 columns **

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Here's a working example of the same on codesandbox.

Here's the code.

import ReactDOM from "react-dom";
import { Grid, Typography, Box, makeStyles } from "@material-ui/core";
const useStyles = makeStyles({
  container: {
    width: "100%",
    border: "2px solid green",
    "& > *": {
      textAlign: "center"
    }
  },
  names: {
    display: "flex"
  }
});
function App() {
  const classes = useStyles();
  return (
    <Box className={classes.container}>
      <Grid container>
        <Grid item xs={6}>
          <Typography className={classes.names}>HEllo</Typography>
        </Grid>
        <Grid item xs={6}>
          <Typography className={classes.names}>HEllo</Typography>
        </Grid>
      </Grid>
    </Box>
  );
}

about 4 years ago · Juan Pablo Isaza Denunciar
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