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

200
Views
¿Hay alguna manera de anular todos los valores predeterminados básicos a la vez en los componentes de NativeBase?

Nuevo en NativeBase y usando la versión 3.4.1 .

Estamos descubriendo rápidamente que preferimos el tamaño "xl" para íconos y texto.
¿Existe una manera más fácil de establecer todos los tamaños de fuente en xl sin anular cada componente?

Actualmente estamos siguiendo los documentos y anulando defaultProps como este...

 import { extendTheme } from 'native-base'; export const ExtendedNativeBaseTheme = extendTheme({ components: { Button: { defaultProps: { size: 'xl', }, }, Checkbox: { defaultProps: { _text: { fontSize: 'xl', }, }, }, Input: { defaultProps: { size: 'xl', }, }, Icon: { defaultProps: { size: 'xl', }, }, IconButton: { defaultProps: { _icon: { size: 'xl', }, }, }, Text: { defaultProps: { fontSize: 'xl', }, }, }, });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La extensión de tema withDefaultSize es lo que desea.

Modificando el ejemplo de sus documentos:

 import { extendTheme, withDefaultSize } from '@chakra-ui/react' const customTheme = extendTheme( withDefaultSize({ size: 'xl', components: ['Button', 'Checkbox', 'Icon', ...], }), )

Todo lo que necesita hacer es enumerar todos los componentes que necesitan tamaño xl en la propiedad de components

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!