I'm struggling to extend the react-native-paper components correctly. What am I doing wrong or how to do it correctly? actually, I'm not totally new to Typescript, but I always struggled with this one:
// TextInput.tsx
import React from "react";
import { TextInput as PaperTextInput } from "react-native-paper";
import { TextInputProps } from "react-native-paper/lib/typescript/src/components/TextInput/TextInput";
interface MyTextInputProps extends TextInputProps {}
const MyTextInput: React.FC<MyTextInputProps> = (props) => {
return <PaperTextInput {...props} />;
};
export default MyTextInput;
// Usage:
<TextInput mode="outlined" style={styles.input} label="Email" />
And I get this error:
Property 'theme' is missing in type '{ mode: "outlined"; style: { alignSelf: "stretch"; }; label: string; }' but required in type 'MyTextInputProps'