Open peterkuiper opened 4 years ago
It should be TextStyle
instead of ViewStyle
:
iconStyle is only used on TextStyle
, see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a1c6ca6270addfda40b781d3ba65e716b162197/types/react-native-vector-icons/Icon.d.ts#L58
+1
Describe the bug
When passing
iconStyle={{ color: 'white' }}
I am getting a typescript error:This is due to
iconStyle?: ViewStyle
inindex.d.ts
. A simple solution would be to useany
instead ofViewStyle
. See https://github.com/oblador/react-native-vector-icons/blob/d969f8c8ba1cb6852b723af6ee4fefc4ee85b083/lib/icon-button.js#L80To Reproduce
Expected behavior
I would not expect a TypeScript error when using
iconStyle
.Enviorment (please complete the following information):