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

487
Views
Cómo cambiar el tamaño de fuente en la aplicación al hacer clic en el botón usando React native

En mi aplicación nativa de reacción, necesito agregar los botones + y - en la pantalla de configuración para aumentar o disminuir el tamaño de fuente en toda la aplicación cuando hacemos clic en esos botones desde la pantalla de configuración. Cualquier ayuda sería apreciada.

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

0

una forma de hacer esto es crear un estado y actualizar el fontsize de fuente en el estilo

ejemplo:

 const [fontSize, setFontSize] = useState(14); return ( <p style={{fontSize: `${fontSize}px`}}> My text </p> <button onChange={() => setFontSize(fontSize + 1)}>More</button> <button onChange={() => setFontSize(fontSize - 1)}>Less</button> );

para hacer esto, puede configurar este fontSize de fuente en el nivel superior.

otra forma de hacer esto es agregar cualquier CSS lib y establecer el mismo estado en un CSS global usando * en css

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!