mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-29 02:18:06 +00:00
Fixed props in input and textarea
This commit is contained in:
parent
d62a914824
commit
ea3ad58d48
@ -155,10 +155,10 @@ const TextArea = ({
|
||||
topLabel,
|
||||
rows,
|
||||
maxRows,
|
||||
autoSelect,
|
||||
state = '',
|
||||
bottomText = '',
|
||||
trezorAction = null,
|
||||
...rest
|
||||
}) => (
|
||||
<Wrapper className={className}>
|
||||
{topLabel && (
|
||||
@ -177,9 +177,9 @@ const TextArea = ({
|
||||
onFocus={onFocus}
|
||||
onBlur={onBlur}
|
||||
value={value}
|
||||
onClick={autoSelect ? event => event.target.select() : null}
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
{... rest}
|
||||
/>
|
||||
<TrezorAction action={trezorAction}>
|
||||
<ArrowUp />{trezorAction}
|
||||
@ -208,6 +208,7 @@ TextArea.propTypes = {
|
||||
isDisabled: PropTypes.bool,
|
||||
topLabel: PropTypes.node,
|
||||
state: PropTypes.string,
|
||||
autoSelect: PropTypes.bool,
|
||||
bottomText: PropTypes.string,
|
||||
trezorAction: PropTypes.node,
|
||||
};
|
||||
|
@ -173,6 +173,7 @@ class Input extends PureComponent {
|
||||
{this.props.icon}
|
||||
<StyledInput
|
||||
autoComplete="off"
|
||||
height={this.props.height}
|
||||
trezorAction={this.props.trezorAction}
|
||||
hasIcon={this.getIcon(this.props.state).length > 0}
|
||||
innerRef={this.props.innerRef}
|
||||
@ -180,8 +181,8 @@ class Input extends PureComponent {
|
||||
type={this.props.type}
|
||||
color={this.getColor(this.props.state)}
|
||||
placeholder={this.props.placeholder}
|
||||
autocorrect={this.props.autocorrect}
|
||||
autocapitalize={this.props.autocapitalize}
|
||||
autoCorrect={this.props.autocorrect}
|
||||
autoCapitalize={this.props.autocapitalize}
|
||||
spellCheck={this.props.spellCheck}
|
||||
isSmallText={this.props.isSmallText}
|
||||
value={this.props.value}
|
||||
@ -216,7 +217,7 @@ Input.propTypes = {
|
||||
innerRef: PropTypes.func,
|
||||
placeholder: PropTypes.string,
|
||||
type: PropTypes.string,
|
||||
autocomplete: PropTypes.string,
|
||||
height: PropTypes.number,
|
||||
autocorrect: PropTypes.string,
|
||||
autocapitalize: PropTypes.string,
|
||||
icon: PropTypes.node,
|
||||
@ -239,7 +240,7 @@ Input.propTypes = {
|
||||
Input.defaultProps = {
|
||||
type: 'text',
|
||||
autoSelect: false,
|
||||
autocomplete: 'off',
|
||||
height: 40,
|
||||
};
|
||||
|
||||
export default Input;
|
||||
|
@ -58,7 +58,7 @@ const Content = ({
|
||||
);
|
||||
|
||||
Content.propTypes = {
|
||||
children: PropTypes.element,
|
||||
children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]),
|
||||
isLoading: PropTypes.bool,
|
||||
title: PropTypes.string,
|
||||
message: PropTypes.string,
|
||||
|
@ -80,9 +80,9 @@ class SignVerify extends Component <Props, SignVerifyState> {
|
||||
topLabel="Address"
|
||||
name="signAddress"
|
||||
value={account.address}
|
||||
height={50}
|
||||
type="text"
|
||||
isSmallText
|
||||
autoSelect
|
||||
isDisabled
|
||||
/>
|
||||
</Row>
|
||||
@ -103,6 +103,7 @@ class SignVerify extends Component <Props, SignVerifyState> {
|
||||
name="signSignature"
|
||||
value={signSignature}
|
||||
rows={4}
|
||||
autoSelect
|
||||
maxRows={4}
|
||||
maxLength="255"
|
||||
isDisabled
|
||||
@ -124,6 +125,7 @@ class SignVerify extends Component <Props, SignVerifyState> {
|
||||
<Row>
|
||||
<Input
|
||||
topLabel="Address"
|
||||
autoSelect
|
||||
name="verifyAddress"
|
||||
value={verifyAddress}
|
||||
onChange={this.handleInputChange}
|
||||
@ -147,6 +149,7 @@ class SignVerify extends Component <Props, SignVerifyState> {
|
||||
<Row>
|
||||
<Textarea
|
||||
topLabel="Signature"
|
||||
autoSelect
|
||||
name="verifySignature"
|
||||
value={verifySignature}
|
||||
onChange={this.handleInputChange}
|
||||
|
Loading…
Reference in New Issue
Block a user