In react-native-paper if I am using TextInput with Icon like this it works fine.
<TextInput
label="Password"
right={<TextInput.Icon icon="eye" />}
/>
But if I export the Icon part to custom element it stop showing the Icon. Am I doing something wrong here?
const MyCustomIcon = () => {
return <TextInput.Icon icon="eye" />;
};
const MyComponent = () => {
return (
<TextInput
label="Password"
right={<MyCustomIcon />}
/>
);
};
export default MyComponent;
Thanks.