From b2a043068ad2a51392cad2213be8e9d07e6f7638 Mon Sep 17 00:00:00 2001 From: Monkey Date: Fri, 9 Aug 2024 15:01:28 -0400 Subject: [PATCH] use mui/lab LoadingButton for CreateWallet --- src/components/CreateWallet.tsx | 22 +++++++++++----------- src/components/MnemonicDialog.tsx | 2 +- src/styles/stylesheet.js | 1 - 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/components/CreateWallet.tsx b/src/components/CreateWallet.tsx index 584377c..0e91e6d 100644 --- a/src/components/CreateWallet.tsx +++ b/src/components/CreateWallet.tsx @@ -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 ( - - + onClick={createWalletHandler} + > + {isWalletCreating ? "Creating" : "CREATE WALLET"} + ); diff --git a/src/components/MnemonicDialog.tsx b/src/components/MnemonicDialog.tsx index b1708af..29cade5 100644 --- a/src/components/MnemonicDialog.tsx +++ b/src/components/MnemonicDialog.tsx @@ -41,7 +41,7 @@ const MnemonicDialog = ({ Copy diff --git a/src/styles/stylesheet.js b/src/styles/stylesheet.js index dfce4a0..d99634f 100644 --- a/src/styles/stylesheet.js +++ b/src/styles/stylesheet.js @@ -3,7 +3,6 @@ import { StyleSheet } from 'react-native'; const styles = StyleSheet.create({ createWalletContainer: { marginTop: 20, - width: 150, alignSelf: 'center', marginBottom: 30, },