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

130
Vistas
React Native Text style is not working (Icon Badge)

I tried to make a badge icon with red text, but all the styles I applied to the Text didn't work at all

IconWithBade.js

import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
import MatComIcon from 'react-native-vector-icons/MaterialCommunityIcons';
export const IconWithBadge = props => {
  const {text, iconName} = props;
  return (
    <View>
      <MatComIcon name={iconName ?? 'cart-variant'} size={22} color="grey" />
      {text && (
        <View style={styles.badgeStyle}>
          <Text styles={styles.BadgeTxt}>12</Text>
        </View>
      )}
    </View>
  );
};
const styles = StyleSheet.create({
  badgeStyle: {
    position: 'absolute',
    right: -5,
    top: -5,
  },
  BadgeTxt: {color: 'red', fontWeight: 'bold'},
});

This my Header.js

everything on text style is not working

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

0

You need remove charater s after styles

<Text style={styles.BadgeTxt}>12</Text>
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