style updates

This commit is contained in:
fmtabbara
2022-01-10 17:27:01 +00:00
parent 1fbf37e0ec
commit 2bef1603ab
10 changed files with 33 additions and 70 deletions
-2
View File
@@ -21,7 +21,6 @@ export const NymCard: React.FC<{
color: 'nym.background.dark',
py: 2.5,
px: 4,
borderBottom: (theme) => `1px solid ${theme.palette.grey[200]}`,
}}
/>
{noPadding ? <CardContentNoPadding>{children}</CardContentNoPadding> : <CardContent>{children}</CardContent>}
@@ -30,7 +29,6 @@ export const NymCard: React.FC<{
}
const CardContentNoPadding = styled(CardContent)(({ theme }) => ({
background: theme.palette.grey[50],
padding: 0,
'&:last-child': {
paddingBottom: 0,
+2 -3
View File
@@ -375,9 +375,7 @@ export const BondForm = ({
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: (theme) => `1px solid ${theme.palette.grey[200]}`,
bgcolor: 'grey.100',
padding: 2,
padding: 3,
}}
>
<Button
@@ -389,6 +387,7 @@ export const BondForm = ({
disableElevation
onClick={handleSubmit(onSubmit)}
endIcon={isSubmitting && <CircularProgress size={20} />}
size="large"
>
Bond
</Button>
@@ -115,9 +115,7 @@ export const DelegateForm = ({
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: (theme) => `1px solid ${theme.palette.grey[200]}`,
bgcolor: 'grey.100',
padding: 2,
padding: 3,
}}
>
<Button
@@ -129,6 +127,7 @@ export const DelegateForm = ({
type="submit"
disableElevation
endIcon={isSubmitting && <CircularProgress size={20} />}
size="large"
>
Delegate stake
</Button>
+19 -47
View File
@@ -1,65 +1,37 @@
import React, { useContext } from 'react'
import QRCode from 'qrcode.react'
import { Alert, Box, Card, Grid, Typography, useMediaQuery } from '@mui/material'
import { Alert, Box, Stack, Typography } from '@mui/material'
import { CopyToClipboard, NymCard } from '../../components'
import { Layout } from '../../layouts'
import { ClientContext } from '../../context/main'
export const Receive = () => {
const { clientDetails } = useContext(ClientContext)
const matches = useMediaQuery('(min-width:769px)')
return (
<Layout>
<NymCard title="Receive Nym">
<Grid container direction="column" spacing={1}>
<Grid item>
<Alert severity="info" data-testid="receive-nym">
You can receive tokens by providing this address to the sender
</Alert>
</Grid>
<Grid item>
<Card
<Stack spacing={3} alignItems="center">
<Alert severity="info" data-testid="receive-nym" sx={{ width: '100%' }}>
You can receive tokens by providing this address to the sender
</Alert>
<Box>
<Typography
data-testid="client-address"
variant="subtitle1"
sx={{
m: [1, 0],
display: 'flex',
justifyContent: 'space-between',
flexWrap: 'wrap',
p: 3,
wordBreak: 'break-word',
mr: 1,
}}
variant="outlined"
component="span"
>
<Grid container direction="column" spacing={4} alignItems="center">
<Grid item>
<Typography
data-testid="client-address"
variant={matches ? 'h5' : 'subtitle1'}
sx={{
wordBreak: 'break-word',
mr: 1,
}}
component="span"
>
{clientDetails?.client_address}
</Typography>
<CopyToClipboard text={clientDetails?.client_address || ''} />
</Grid>
<Grid item>
<Box
sx={{
display: 'flex',
justifyContent: 'center',
mb: 2,
}}
component="div"
>
{clientDetails && <QRCode data-testid="qr-code" value={clientDetails.client_address} />}
</Box>
</Grid>
</Grid>
</Card>
</Grid>
</Grid>
Your address: {clientDetails?.client_address}
</Typography>
<CopyToClipboard text={clientDetails?.client_address || ''} iconButton />
</Box>
{clientDetails && <QRCode data-testid="qr-code" value={clientDetails.client_address} />}
</Stack>
</NymCard>
</Layout>
)
+2 -3
View File
@@ -138,9 +138,7 @@ export const SendWizard = () => {
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: (theme) => `1px solid ${theme.palette.grey[200]}`,
bgcolor: 'grey.100',
p: 2,
p: 3,
}}
>
{activeStep === 1 && (
@@ -155,6 +153,7 @@ export const SendWizard = () => {
data-testid="button"
onClick={activeStep === 0 ? handleNextStep : activeStep === 1 ? handleSend : handleFinish}
disabled={!!(methods.formState.errors.amount || methods.formState.errors.to || isLoading)}
size="large"
>
{activeStep === 0 ? 'Next' : activeStep === 1 ? 'Send' : 'Finish'}
</Button>
+1 -3
View File
@@ -18,9 +18,7 @@ export const Profile = () => {
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: (theme) => `1px solid ${theme.palette.grey[300]}`,
bgcolor: 'grey.200',
padding: 2,
padding: 3,
}}
>
<Button variant="contained" color="primary" type="submit" disableElevation disabled>
@@ -118,9 +118,7 @@ export const SystemVariables = ({
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
borderTop: (theme) => `1px solid ${theme.palette.grey[300]}`,
bgcolor: 'grey.200',
padding: 2,
padding: 3,
}}
>
{nodeUpdateResponse === 'success' ? (
@@ -137,6 +135,7 @@ export const SystemVariables = ({
disableElevation
endIcon={isSubmitting && <CircularProgress size={20} />}
disabled={Object.keys(errors).length > 0 || isSubmitting}
size="large"
>
Update Profit Margin
</Button>
@@ -100,9 +100,7 @@ export const UndelegateForm = ({
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: (theme) => `1px solid ${theme.palette.grey[200]}`,
bgcolor: 'grey.100',
p: 2,
p: 3,
}}
>
<Button
@@ -114,6 +112,7 @@ export const UndelegateForm = ({
disableElevation
disabled={isSubmitting}
endIcon={isSubmitting && <CircularProgress size={20} />}
size="large"
>
Undelegate stake
</Button>
+2 -3
View File
@@ -91,9 +91,7 @@ export const Undelegate = () => {
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
borderTop: '1px solid grey[200]',
bgcolor: 'grey.100',
p: 2,
p: 3,
}}
>
<Button
@@ -104,6 +102,7 @@ export const Undelegate = () => {
setStatus(EnumRequestStatus.initial)
initialize()
}}
size="large"
>
Finish
</Button>
+1
View File
@@ -201,6 +201,7 @@ export const getDesignTokens = (mode: PaletteMode): ThemeOptions => {
styleOverrides: {
sizeLarge: {
height: 55,
padding: '13px 24px',
},
},
},