use mui/lab LoadingButton for CreateWallet
This commit is contained in:
parent
f67569a25e
commit
b2a043068a
@ -1,9 +1,8 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import { View } from 'react-native';
|
import { View } from "react-native";
|
||||||
import { Button } from 'react-native-paper';
|
import { LoadingButton } from "@mui/lab";
|
||||||
|
|
||||||
import { CreateWalletProps } from '../types';
|
import { CreateWalletProps } from "../types";
|
||||||
import styles from '../styles/stylesheet';
|
|
||||||
|
|
||||||
const CreateWallet = ({
|
const CreateWallet = ({
|
||||||
isWalletCreating,
|
isWalletCreating,
|
||||||
@ -11,14 +10,15 @@ const CreateWallet = ({
|
|||||||
}: CreateWalletProps) => {
|
}: CreateWalletProps) => {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<View style={styles.createWalletContainer}>
|
<View>
|
||||||
<Button
|
<LoadingButton
|
||||||
mode="contained"
|
variant="contained"
|
||||||
loading={isWalletCreating}
|
loading={isWalletCreating}
|
||||||
disabled={isWalletCreating}
|
disabled={isWalletCreating}
|
||||||
onPress={createWalletHandler}>
|
onClick={createWalletHandler}
|
||||||
{isWalletCreating ? 'Creating' : 'Create Wallet'}
|
>
|
||||||
</Button>
|
{isWalletCreating ? "Creating" : "CREATE WALLET"}
|
||||||
|
</LoadingButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -41,7 +41,7 @@ const MnemonicDialog = ({
|
|||||||
Copy
|
Copy
|
||||||
</Button>
|
</Button>
|
||||||
<Button style={{ ...styles.mnemonicButton }} onClick={hideDialog}>
|
<Button style={{ ...styles.mnemonicButton }} onClick={hideDialog}>
|
||||||
Cancel
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -3,7 +3,6 @@ import { StyleSheet } from 'react-native';
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
createWalletContainer: {
|
createWalletContainer: {
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
width: 150,
|
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
marginBottom: 30,
|
marginBottom: 30,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user