use mui/lab LoadingButton for CreateWallet

This commit is contained in:
Monkey 2024-08-09 15:01:28 -04:00
parent 72d9bd453f
commit af9b10341c
2 changed files with 7 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import { View } from 'react-native';
import React from 'react';
import { Button } from 'react-native-paper';
import { LoadingButton } from '@mui/lab';
import { CreateWalletProps } from '../types';
import styles from '../styles/stylesheet';
@ -11,14 +11,14 @@ 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

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