Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native Picker Select - "TS2769: No overload matches this call" on Icon Property

$
0
0

I get this error on the Icon property "TS2769: No overload matches this call."

Here is the React Native Picker Select I have used. The problem happens at the Icon property.

<RNPickerSelect            disabled={false}            onValueChange={el => {              setValue(el);            }}            value={value}            placeholder={{}}            useNativeAndroidPickerStyle={false}            items={items}            Icon={() => {              return <SvgImage width={24} height={24} fill={dropdownColor} />;            }}          />

The Svg image interface and component which is used inside RNPickerSelect property

 export interface IProps {      width: number;      height: number;      fill: string;    }export const SvgImage = ({ width, height, fill }: IProps): JSX.Element => {  return (<Svg width={width} height={height}><Path fill='none' d='M0 0h24v24H0z' /><Path fill={fill} d='m7 10 5 5 5-5' /></Svg>  );};

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>