style: container
This commit is contained in:
parent
1e0a0e66cc
commit
b6cd5deddd
16
src/components/Container.tsx
Normal file
16
src/components/Container.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import { Box } from "@mui/material";
|
||||
import React, { PropsWithChildren } from "react";
|
||||
|
||||
export const Container: React.FC<PropsWithChildren> = ({ children }) => (
|
||||
<Box
|
||||
sx={{
|
||||
maxWidth: "752px",
|
||||
marginX: "auto",
|
||||
backgroundColor: "background.paper",
|
||||
padding: 3,
|
||||
borderRadius: 2,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
);
|
@ -1,7 +1,7 @@
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import { View, ActivityIndicator, Image } from "react-native";
|
||||
import { Text } from "react-native-paper";
|
||||
import { Box, Button, Divider } from "@mui/material";
|
||||
import { Button, Divider } from "@mui/material";
|
||||
|
||||
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
@ -18,6 +18,7 @@ import { useAccounts } from "../context/AccountsContext";
|
||||
import { useWalletConnect } from "../context/WalletConnectContext";
|
||||
import { NetworksDataState, StackParamsList } from "../types";
|
||||
import { useNetworks } from "../context/NetworksContext";
|
||||
import { Container } from "../components/Container";
|
||||
|
||||
const WCLogo = () => {
|
||||
return (
|
||||
@ -129,7 +130,7 @@ const HomeScreen = () => {
|
||||
|
||||
return (
|
||||
<View style={styles.appContainer}>
|
||||
<Box sx={{ maxWidth: "752px", marginX: "auto" }}>
|
||||
<Container>
|
||||
{!isAccountsFetched ? (
|
||||
<View style={styles.spinnerContainer}>
|
||||
<Text style={styles.LoadingText}>Loading...</Text>
|
||||
@ -169,7 +170,7 @@ const HomeScreen = () => {
|
||||
hideDialog={hideResetDialog}
|
||||
onConfirm={confirmResetWallet}
|
||||
/>
|
||||
</Box>
|
||||
</Container>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user