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

209
Views
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
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!