[FIX] Toggle password visibility button not working (#3404)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
8de6adcf79
commit
8916a195a8
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { StyleSheet, Text, View } from 'react-native';
|
import { StyleSheet, Text, View } from 'react-native';
|
||||||
import { BorderlessButton } from 'react-native-gesture-handler';
|
import Touchable from 'react-native-platform-touchable';
|
||||||
|
|
||||||
import sharedStyles from '../views/Styles';
|
import sharedStyles from '../views/Styles';
|
||||||
import TextInput from '../presentation/TextInput';
|
import TextInput from '../presentation/TextInput';
|
||||||
|
@ -95,9 +95,9 @@ export default class RCTextInput extends React.PureComponent<IRCTextInputProps,
|
||||||
get iconRight() {
|
get iconRight() {
|
||||||
const { iconRight, onIconRightPress, theme } = this.props;
|
const { iconRight, onIconRightPress, theme } = this.props;
|
||||||
return (
|
return (
|
||||||
<BorderlessButton onPress={onIconRightPress} style={[styles.iconContainer, styles.iconRight]}>
|
<Touchable onPress={onIconRightPress} style={[styles.iconContainer, styles.iconRight]}>
|
||||||
<CustomIcon name={iconRight} style={{ color: themes[theme].bodyText }} size={20} />
|
<CustomIcon name={iconRight} style={{ color: themes[theme].bodyText }} size={20} />
|
||||||
</BorderlessButton>
|
</Touchable>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,14 +105,14 @@ export default class RCTextInput extends React.PureComponent<IRCTextInputProps,
|
||||||
const { showPassword } = this.state;
|
const { showPassword } = this.state;
|
||||||
const { testID, theme } = this.props;
|
const { testID, theme } = this.props;
|
||||||
return (
|
return (
|
||||||
<BorderlessButton onPress={this.tooglePassword} style={[styles.iconContainer, styles.iconRight]}>
|
<Touchable onPress={this.tooglePassword} style={[styles.iconContainer, styles.iconRight]}>
|
||||||
<CustomIcon
|
<CustomIcon
|
||||||
name={showPassword ? 'unread-on-top' : 'unread-on-top-disabled'}
|
name={showPassword ? 'unread-on-top' : 'unread-on-top-disabled'}
|
||||||
testID={testID ? `${testID}-icon-right` : null}
|
testID={testID ? `${testID}-icon-right` : null}
|
||||||
style={{ color: themes[theme].auxiliaryText }}
|
style={{ color: themes[theme].auxiliaryText }}
|
||||||
size={20}
|
size={20}
|
||||||
/>
|
/>
|
||||||
</BorderlessButton>
|
</Touchable>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue