-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: recovery dashboard widget #2768
Changes from 3 commits
4ed78d7
80204f4
0a1dca6
bd7fa18
2be3dd6
a801c51
0fa4d42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Box, Button, Card, Chip, Grid, Typography } from '@mui/material' | ||
import type { ReactElement } from 'react' | ||
|
||
import RecoveryLogo from '@/public/images/common/recovery.svg' | ||
import { WidgetBody, WidgetContainer } from '@/components/dashboard/styled' | ||
|
||
import css from './styles.module.css' | ||
|
||
export function Recovery(): ReactElement { | ||
const onClick = () => { | ||
// TODO: Open enable recovery flow | ||
} | ||
|
||
return ( | ||
<WidgetContainer> | ||
<Typography component="h2" variant="subtitle1" className={css.label}> | ||
New in {'Safe{Wallet}'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: The Figma design says There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wording is incorrect in the design. This is a Safe{Wallet} feature. |
||
</Typography> | ||
|
||
<WidgetBody> | ||
<Card className={css.card}> | ||
<Grid container className={css.grid}> | ||
<Grid item> | ||
<RecoveryLogo alt="Vault with a circular arrow around it" /> | ||
</Grid> | ||
<Grid item xs> | ||
<Box className={css.wrapper}> | ||
<Typography variant="h4" className={css.title}> | ||
Introducing account recovery{' '} | ||
</Typography> | ||
<Chip label="New" color="primary" size="small" className={css.chip} /> | ||
</Box> | ||
<Typography mt={1} mb={3}> | ||
Ensure that you never lose access to your funds by choosing a guardian to recover your account. | ||
</Typography> | ||
<Button variant="contained" onClick={onClick}> | ||
Set up recovery | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
</Card> | ||
</WidgetBody> | ||
</WidgetContainer> | ||
) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.label { | ||
font-weight: 700; | ||
margin-bottom: var(--space-2); | ||
} | ||
|
||
.card { | ||
padding: var(--space-4); | ||
height: inherit; | ||
} | ||
|
||
.grid { | ||
display: flex; | ||
align-items: center; | ||
height: inherit; | ||
gap: var(--space-3); | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
align-items: center; | ||
gap: var(--space-1); | ||
} | ||
|
||
.title { | ||
font-weight: 700; | ||
display: inline; | ||
} | ||
|
||
.chip { | ||
border-radius: 4px; | ||
font-size: 12px; | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't mind removing this widget but for visibility I would suggest we document it somewhere. |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was failing for some reason. Fixed after consultation with @mike10ca.