Browse Source

FIX: Disable Clear button if no text is inserted

shakedebug
Marcos Rodriguez 5 years ago
committed by Overtorment
parent
commit
73b135d69d
  1. 12
      screen/wallets/import.js

12
screen/wallets/import.js

@ -271,24 +271,24 @@ export default class WalletsImport extends Component {
>
<BlueButton
disabled={this.state.isLoading}
title="Clear"
title="Paste Clipboard"
buttonStyle={{
width: width / 1.5,
}}
onPress={async () => {
this.setState({ label: '' });
const clipboard = await Clipboard.getString();
this.setState({ label: clipboard }, () => Keyboard.dismiss());
}}
/>
<BlueSpacing20 />
<BlueButton
disabled={this.state.isLoading}
title="Paste Clipboard"
disabled={this.state.isLoading || this.state.label.length <= 0}
title="Clear"
buttonStyle={{
width: width / 1.5,
}}
onPress={async () => {
const clipboard = await Clipboard.getString();
this.setState({ label: clipboard }, () => Keyboard.dismiss());
this.setState({ label: '' });
}}
/>
<BlueSpacing20 />

Loading…
Cancel
Save