mirror of
https://github.com/trezor/trezor-wallet
synced 2025-08-01 19:38:38 +00:00
styles for readOnly input
This commit is contained in:
parent
2cdd32c503
commit
2eb6785b0d
@ -62,6 +62,13 @@ const StyledInput = styled.input`
|
|||||||
color: ${colors.TEXT_SECONDARY};
|
color: ${colors.TEXT_SECONDARY};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:read-only {
|
||||||
|
${props => !props.isReceiveAddress && css`
|
||||||
|
background: ${colors.GRAY_LIGHT};
|
||||||
|
color: ${colors.TEXT_SECONDARY};
|
||||||
|
`}
|
||||||
|
}
|
||||||
|
|
||||||
${props => props.trezorAction && css`
|
${props => props.trezorAction && css`
|
||||||
z-index: 10001;
|
z-index: 10001;
|
||||||
position: relative; /* bigger than modal container */
|
position: relative; /* bigger than modal container */
|
||||||
@ -184,6 +191,7 @@ class Input extends PureComponent {
|
|||||||
autoCorrect={this.props.autocorrect}
|
autoCorrect={this.props.autocorrect}
|
||||||
autoCapitalize={this.props.autocapitalize}
|
autoCapitalize={this.props.autocapitalize}
|
||||||
spellCheck={this.props.spellCheck}
|
spellCheck={this.props.spellCheck}
|
||||||
|
isReceiveAddress={this.props.isReceiveAddress}
|
||||||
isSmallText={this.props.isSmallText}
|
isSmallText={this.props.isSmallText}
|
||||||
value={this.props.value}
|
value={this.props.value}
|
||||||
readOnly={this.props.readOnly}
|
readOnly={this.props.readOnly}
|
||||||
@ -235,12 +243,14 @@ Input.propTypes = {
|
|||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
isSmallText: PropTypes.bool,
|
isSmallText: PropTypes.bool,
|
||||||
isPartiallyHidden: PropTypes.bool,
|
isPartiallyHidden: PropTypes.bool,
|
||||||
|
isReceiveAddress: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
Input.defaultProps = {
|
Input.defaultProps = {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
autoSelect: false,
|
autoSelect: false,
|
||||||
height: 40,
|
height: 40,
|
||||||
|
isReceiveAddress: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Input;
|
export default Input;
|
||||||
|
Loading…
Reference in New Issue
Block a user