use mui/lab LoadingButton for CreateWallet

This commit is contained in:
Monkey 2024-08-09 15:01:28 -04:00 committed by Cody Bender
parent f67569a25e
commit b2a043068a
3 changed files with 12 additions and 13 deletions

View File

@ -1,9 +1,8 @@
import React from 'react';
import { View } from 'react-native';
import { Button } from 'react-native-paper';
import React from "react";
import { View } from "react-native";
import { LoadingButton } from "@mui/lab";
import { CreateWalletProps } from '../types';
import styles from '../styles/stylesheet';
import { CreateWalletProps } from "../types";
const CreateWallet = ({
isWalletCreating,
@ -11,14 +10,15 @@ const CreateWallet = ({
}: CreateWalletProps) => {
return (
<View>
<View style={styles.createWalletContainer}>
<Button
mode="contained"
<View>
<LoadingButton
variant="contained"
loading={isWalletCreating}
disabled={isWalletCreating}
onPress={createWalletHandler}>
{isWalletCreating ? 'Creating' : 'Create Wallet'}
</Button>
onClick={createWalletHandler}
>
{isWalletCreating ? "Creating" : "CREATE WALLET"}
</LoadingButton>
</View>
</View>
);

View File

@ -41,7 +41,7 @@ const MnemonicDialog = ({
Copy
</Button>
<Button style={{ ...styles.mnemonicButton }} onClick={hideDialog}>
Cancel
Done
</Button>
</DialogActions>
</Dialog>

View File

@ -3,7 +3,6 @@ import { StyleSheet } from 'react-native';
const styles = StyleSheet.create({
createWalletContainer: {
marginTop: 20,
width: 150,
alignSelf: 'center',
marginBottom: 30,
},