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

212
Vistas
Can I extend components of this type - PaperTextInput.Icon or Tab.Navigator when using styled components?

I've been trying to extend components like PaperTextInput.Icon or Tab.Navigator but have been failing and I'm wondering how am I supposed to extend them? What I'm trying to achieve is replace PaperTextInput.Icon with StyledInputIcon which extends PaperTextInput.Icon. Unfortunately, this doesn't seem to work.

const PasswordInput: FunctionComponent<Props> = ({
    label,
    value,
    error,
    toggleShowPassword,
    hideInput = true,
    ...rest
}) => {
    return (
        <TextInput
            label={label}
            value={value}
            mode="outlined"
            error={error}
            textContentType="password"
            secureTextEntry={hideInput}
            right={
                <PaperTextInput.Icon
                    style={styles.icon}
                    color={colors.primary600}
                    name={hideInput ? 'eye' : 'eye-off'}
                    accessibilityLabel={hideInput ? 'Show password' : 'Hide password'}
                    onPress={toggleShowPassword}
                />
            }
            {...rest}
        />
    );
};

const StyledInputIcon = styled(PaperTextInput.Icon)`
    margin-top: 15px;
    margin-right: 5px;
`;

export default PasswordInput;
about 4 years ago · Juan Pablo Isaza
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