mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-11 16:41:06 +00:00
Add disable state for Input
This commit is contained in:
parent
38d42cd1c5
commit
d3881620b8
@ -48,6 +48,7 @@ const StyledInput = styled.input`
|
||||
background-color: ${colors.WHITE};
|
||||
transition: ${TRANSITION.HOVER};
|
||||
&:disabled {
|
||||
pointer-events: none;
|
||||
background: ${colors.GRAY_LIGHT};
|
||||
color: ${colors.TEXT_SECONDARY};
|
||||
}
|
||||
@ -117,6 +118,7 @@ class Input extends Component {
|
||||
value={this.props.value}
|
||||
onChange={this.props.onChange}
|
||||
borderColor={this.getColor(this.props.state)}
|
||||
disabled={this.props.isDisabled}
|
||||
/>
|
||||
</InputIconWrapper>
|
||||
{this.props.sideAddons && this.props.sideAddons.map(sideAddon => sideAddon)}
|
||||
@ -147,6 +149,7 @@ Input.propTypes = {
|
||||
bottomText: PropTypes.string,
|
||||
inputLabel: PropTypes.string,
|
||||
sideAddons: PropTypes.arrayOf(PropTypes.node),
|
||||
isDisabled: PropTypes.bool,
|
||||
};
|
||||
|
||||
Input.defaultProps = {
|
||||
|
Loading…
Reference in New Issue
Block a user