web: Components: Added showing password on click generate button at PasswordInput component

This commit is contained in:
Ilya Oleshko 2019-10-23 13:18:49 +03:00
parent 5741cafc0f
commit af172c8fc0

View File

@ -65,7 +65,7 @@ const Progress = styled.div`
`;
const StyledTooltipContainer = styled(Text.Body)`
/*margin: 8px 16px 16px 16px;*/
//margin: 8px 16px 16px 16px;
`;
const StyledTooltipItem = styled(Text.Body)`
@ -184,6 +184,13 @@ class PasswordInput extends React.Component {
return e.preventDefault();
const newPassword = this.getNewPassword();
if (this.state.type !== 'text') {
this.setState({
type: 'text'
});
}
this.checkPassword(newPassword);
this.props.onChange && this.props.onChange({ target: { value: newPassword } });
}
@ -352,7 +359,7 @@ class PasswordInput extends React.Component {
tabIndex={tabIndex}
maxLength={maxLength}
autoComplete={autoComplete}
>
>
</InputBlock>
<TooltipStyle>
<Tooltip