Skip to content

Commit b1f0019

Browse files
Inbal-Tishethanshar
authored andcommitted
allow passing all Image source propTypes to rightButtonProps's iconSource prop (issue #615) (#617)
1 parent 7d08c13 commit b1f0019

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/inputs/TextField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _ from 'lodash';
22
import PropTypes from 'prop-types';
33
import React from 'react';
4-
import {StyleSheet, Animated, TextInput as RNTextInput} from 'react-native';
4+
import {StyleSheet, Animated, TextInput as RNTextInput, Image as RNImage} from 'react-native';
55
import {Constants} from '../../helpers';
66
import {Colors, Typography} from '../../style';
77
import BaseInput from './BaseInput';
@@ -136,7 +136,7 @@ export default class TextField extends BaseInput {
136136
* Props for the right button {iconSource, onPress, style}
137137
*/
138138
rightButtonProps: PropTypes.shape({
139-
iconSource: PropTypes.number,
139+
iconSource: RNImage.propTypes.source,
140140
iconColor: PropTypes.string,
141141
onPress: PropTypes.func,
142142
style: PropTypes.oneOfType([PropTypes.object, PropTypes.number])

0 commit comments

Comments
 (0)