web: Components: Added missing PropTypes and fixed repetitive property at PasswordInput component.
This commit is contained in:
parent
326a14d0cc
commit
cc869679ff
@ -11,6 +11,11 @@ import DropDown from '../drop-down'
|
|||||||
|
|
||||||
const SimpleInput = ({ onValidateInput, onCopyToClipboard, ...props }) => <div {...props}></div>;
|
const SimpleInput = ({ onValidateInput, onCopyToClipboard, ...props }) => <div {...props}></div>;
|
||||||
|
|
||||||
|
SimpleInput.propTypes = {
|
||||||
|
onValidateInput: PropTypes.func,
|
||||||
|
onCopyToClipboard: PropTypes.func
|
||||||
|
}
|
||||||
|
|
||||||
const StyledInput = styled(SimpleInput)`
|
const StyledInput = styled(SimpleInput)`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -297,7 +302,7 @@ class PasswordInput extends React.PureComponent {
|
|||||||
<PasswordProgress inputWidth={inputWidth}>
|
<PasswordProgress inputWidth={inputWidth}>
|
||||||
<InputBlock
|
<InputBlock
|
||||||
name={inputName}
|
name={inputName}
|
||||||
hasError={false}
|
hasError={hasError}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
iconName='EyeIcon'
|
iconName='EyeIcon'
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
@ -310,7 +315,6 @@ class PasswordInput extends React.PureComponent {
|
|||||||
isIconFill={true}
|
isIconFill={true}
|
||||||
onFocus={this.onFocus}
|
onFocus={this.onFocus}
|
||||||
onBlur={this.onBlur}
|
onBlur={this.onBlur}
|
||||||
hasError={hasError}
|
|
||||||
hasWarning={hasWarning}
|
hasWarning={hasWarning}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
tabIndex={tabIndex}
|
tabIndex={tabIndex}
|
||||||
@ -346,8 +350,8 @@ class PasswordInput extends React.PureComponent {
|
|||||||
</CopyLink>
|
</CopyLink>
|
||||||
</StyledInput>
|
</StyledInput>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
PasswordInput.propTypes = {
|
PasswordInput.propTypes = {
|
||||||
inputType: PropTypes.oneOf(['text', 'password']),
|
inputType: PropTypes.oneOf(['text', 'password']),
|
||||||
@ -355,6 +359,12 @@ PasswordInput.propTypes = {
|
|||||||
emailInputName: PropTypes.string.isRequired,
|
emailInputName: PropTypes.string.isRequired,
|
||||||
inputValue: PropTypes.string,
|
inputValue: PropTypes.string,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
|
inputWidth: PropTypes.string,
|
||||||
|
hasError: PropTypes.bool,
|
||||||
|
hasWarning: PropTypes.bool,
|
||||||
|
placeholder: PropTypes.string,
|
||||||
|
tabIndex: PropTypes.number,
|
||||||
|
maxLength: PropTypes.number,
|
||||||
|
|
||||||
isDisabled: PropTypes.bool,
|
isDisabled: PropTypes.bool,
|
||||||
size: PropTypes.oneOf(['base', 'middle', 'big', 'huge']),
|
size: PropTypes.oneOf(['base', 'middle', 'big', 'huge']),
|
||||||
|
Loading…
Reference in New Issue
Block a user