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

161
Views
¿No es posible diseñar un componente anidado dentro de la función 'styled()' de MUI?

Como puede ver a continuación, estoy tratando de diseñar un componente MUI Stack dentro de un componente MUI Dialog, pero los estilos Stack no se aplican en mi código:

 const CustomDialog = styled(Dialog)(({ theme }) => ({ '& .MuiDialog-paper': { backgroundColor: theme.palette.error.light, color: theme.palette.background.default, textAlign: 'center', }, '& .MuiDialogContent-root': { marginTop: 2, marginBottom: 2, }, '& .MuiStack-root': { direction: 'row', spacing: 1, padding: 1, }, '& .MuiButton-root': { ':first-of-type': { color: theme.palette.error.light, backgroundColor: theme.palette.background.default, ':hover': { backgroundColor: theme.palette.error.dark } }, ':last-of-type': { backgroundColor: theme.palette.success.main, ':hover': { backgroundColor: theme.palette.success.dark } } } }));

Y aquí está el CustomDialog en acción:

 <CustomDialog> <DialogTitle> ... </DialogTitle> <DialogContent> ... </DialogContent> <Stack> <Button> ... </Button> <Button> ... </Button> </Stack> </CustomDialog>;

La pila debería estar alineando los botones uno al lado del otro, pero todavía están uno encima del otro verticalmente

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

En la pila, puede agregar un accesorio de dirección para configurarlo de la manera que desee, proporciono el ejemplo de código que puede probar.

 <Stack direction="row"> <Button> ... </Button> <Button> ... </Button> </Stack>

about 4 years ago · Santiago Gelvez 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!