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

373
Views
RN: envolver botones cuando un tamaño de fuente grande

Tengo dos botones seguidos. Al aumentar el tamaño de letra el texto sale para la siguiente línea. ¿Es posible envolver los botones cuando se aumenta el tamaño de fuente? Estoy tratando de configurar flex: 1 1 50% y min-width para botones y flex-direction: fila; envoltura flexible: envoltura; alinear elementos: centro; para el contenedor, pero ese ajuste para el tamaño de fuente predeterminado y el aumento.

Tamaño del botón prop: ancho: ${props => props.size === 'normal' || props.size === 'grande' ? '100%': nulo};

Tamaño de fuente predeterminado:

ingrese la descripción de la imagen aquí

Aumentar el tamaño de fuente en la configuración:

ingrese la descripción de la imagen aquí

Envolviendo con defecto y aumentando:

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

 <styled.Container> <styled.ButtonWrap> <Button size='minimal' style={{ alignItems: 'center' }} title='Inapoi' type='secondary' /> </styled.ButtonWrap> <styled.ButtonWrap> <Button size='minimal' style={{ alignItems: 'center' }} title='Urmatorul' /> </styled.ButtonWrap> </styled.Container>
 export const Container = styled.View` margin-top: 8px; flex-direction: row; flex-wrap: wrap; align-items: center; background-color: #fa755a; `; export const ButtonWrap = styled.View` flex: 1 1 50%; min-width: 198px; margin-left: 8px; margin-right: 8px; margin-top: 6px; background-color: #0db41b; `;

UPD: Resuelto con

 export const ButtonWrap = styled.View` flex: auto; margin-top: 6px; margin-left: 8px; margin-right: 8px; min-width: 162px; `; export const Container = styled.View` flex-flow: wrap; margin-top: 8px; align-items: center; `;
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

En realidad, no configuró la display de Container a flex . SI agrega lo siguiente a Container , debería estar bien.

 display: flex;

De lo contrario, siempre puede usar el bloque en línea, que tiene ajuste automático. Lo único que tiene que hacer es establecer margin: auto para centrar los elementos.

about 4 years ago · Juan Pablo Isaza Report

0

Resuelto con:

 export const ButtonWrap = styled.View` flex: auto; margin-top: 6px; margin-left: 8px; margin-right: 8px; min-width: 162px; `; export const Container = styled.View` flex-flow: wrap; margin-top: 8px; align-items: center; `;
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!