diff --git a/tauri-wallet/src/components/BalanceCard.tsx b/tauri-wallet/src/components/BalanceCard.tsx new file mode 100644 index 0000000000..b30caf8ef4 --- /dev/null +++ b/tauri-wallet/src/components/BalanceCard.tsx @@ -0,0 +1,109 @@ +import React, { useContext } from 'react' +import { makeStyles } from '@material-ui/core/styles' +import { + Card, + CardMedia, + CardContent, + Typography, + CardHeader, + IconButton, +} from '@material-ui/core' +import logo from '../images/logo.png' +import { theme } from '../theme' +import { ClientContext } from '../context/main' +import { FileCopy, Refresh } from '@material-ui/icons' + +const useStyles = makeStyles(({ spacing }) => ({ + root: { + margin: spacing(10, 5, 3, 7), + borderRadius: spacing(2), // 16px + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + paddingBottom: spacing(2), + paddingTop: spacing(2), + minWidth: 300, + position: 'relative', + }, + media: { + marginLeft: spacing(-7), + position: 'fixed', + }, + content: { + marginLeft: theme.spacing(4), + }, +})) + +export const BalanceCard = React.memo(function BlogCard() { + const styles = useStyles() + const { client } = useContext(ClientContext) + return ( + + } + className={styles.media} + /> + + + + + } + /> + + + + } + lastChild + /> + + + ) +}) + +const BalanceCardField = ({ + primaryText, + subText, + Action, + lastChild, +}: { + primaryText: string + subText: string + Action?: React.ReactNode + lastChild?: boolean +}) => { + return ( +
+ + {primaryText} + +
+ + {subText} + + {Action} +
+
+ ) +} diff --git a/tauri-wallet/src/components/Nav.tsx b/tauri-wallet/src/components/Nav.tsx index 1a31afb3a8..86130dd608 100644 --- a/tauri-wallet/src/components/Nav.tsx +++ b/tauri-wallet/src/components/Nav.tsx @@ -19,6 +19,7 @@ import { } from '@material-ui/icons' import { makeStyles } from '@material-ui/styles' import clsx from 'clsx' +import { theme } from '../theme' const routesSchema = [ { @@ -78,28 +79,37 @@ export const Nav = () => { const location = useLocation() return ( - - {routesSchema.map((r, i) => ( - - - {r.Icon} - - + + {routesSchema.map((r, i) => ( + + - - ))} - + ])} + > + {r.Icon} + + + + ))} + + ) } diff --git a/tauri-wallet/src/components/Page.tsx b/tauri-wallet/src/components/Page.tsx index df1cb309e2..592a7e7fb8 100644 --- a/tauri-wallet/src/components/Page.tsx +++ b/tauri-wallet/src/components/Page.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { BalanceCard } from './BalanceCard' import { Nav } from './Nav' export const Page = ({ children }: { children: React.ReactElement }) => { @@ -18,14 +19,14 @@ export const Page = ({ children }: { children: React.ReactElement }) => { style={{ gridArea: '1 / 1 / 2 / 2', background: '#121726', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', + borderTopRightRadius: 10, borderBottomRightRadius: 10, }} > +