In my placeholderTextColor the error of the title persist and do not find a solution
import React from 'react';import { TextInputProps } from 'react-native';import { color } from 'react-native-reanimated';import { Container, TextInput, Icon } from './styles';interface InputProps extends TextInputProps { name: string; icon: string;}// todas as propriedades "rest" sao passadas para o TExt Input, no caso apenas o placeholderconst Input: React.FC<InputProps> = ({ name, icon, ...placeholder }) => (<Container><Icon name={icon} size={20} color="#666360" /><TextInput keyboardAppearance="dark" placeholderTextColor="#666360" {...placeholder} /></Container>);export default Input;
The error persists, if I remove spread operator the error is vanish, but it s not a solution
Full Error
(JSX attribute) placeholderTextColor?: string | typeof OpaqueColorValue | undefinedThe text color of the placeholder string
No overload matches this call.Overload 1 of 2, '(props: Pick<Pick<TextInputProps & RefAttributes, "ref" | "style" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | ... 104 more ... | "showSoftInputOnFocus"> & Partial<...>, "ref" | ... 109 more ... | "showSoftInputOnFocus"> & { ...; } & { ...; } & { ...; }): ReactElement<...>', gave the following error.Type 'ColorValue' is not assignable to type 'string | unique symbol | undefined'.Type 'unique symbol' is not assignable to type 'string | unique symbol | undefined'.Overload 2 of 2, '(props: StyledComponentPropsWithAs<typeof TextInput, DefaultTheme, {}, never>): ReactElement<StyledComponentPropsWithAs<typeof TextInput, DefaultTheme, {}, never>, string | ... 1 more ... | (new (props: any) => Component<...>)>', gave the following error.Type 'ColorValue' is not assignable to type 'string | unique symbol | undefined'.Type 'unique symbol' is not assignable to type 'string | unique symbol | undefined'.ts(2769)index.d.ts(1626, 5): The expected type comes from property 'placeholderTextColor' which is declared here on type 'IntrinsicAttributes & Pick<Pick<TextInputProps & RefAttributes, "ref" | "style" | "hitSlop" | ... 107 more ... | "showSoftInputOnFocus"> & Partial<...>, "ref" | ... 109 more ... | "showSoftInputOnFocus"> & { ...; } & { ...; } & { ...; }'index.d.ts(1626, 5): The expected type comes from property 'placeholderTextColor' which is declared here on type 'IntrinsicAttributes & Pick<Pick<TextInputProps & RefAttributes, "ref" | "style" | "hitSlop" | ... 107 more ... | "showSoftInputOnFocus"> & Partial<...>, "ref" | ... 109 more ... | "showSoftInputOnFocus"> & { ...; } & { ...; } & { ...; }'