-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 55 additions & 1 deletion
56
src/components/tx-flow/flows/EnableRecovery/EnableRecoveryFlowSettings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,68 @@ | ||
import { Divider, CardActions, Button, Typography } from '@mui/material' | ||
import { useForm, FormProvider } from 'react-hook-form' | ||
import type { ReactElement } from 'react' | ||
|
||
import TxCard from '../../common/TxCard' | ||
import type { EnableRecoveryFlowProps } from '.' | ||
|
||
import commonCss from '@/components/tx-flow/common/styles.module.css' | ||
|
||
export function EnableRecoveryFlowSettings({ | ||
params, | ||
onSubmit, | ||
}: { | ||
params: EnableRecoveryFlowProps | ||
onSubmit: (formData: EnableRecoveryFlowProps) => void | ||
}): ReactElement { | ||
return <TxCard>EnableRecoveryFlowSettings</TxCard> | ||
const formMethods = useForm<EnableRecoveryFlowProps>({ | ||
defaultValues: params, | ||
mode: 'onChange', | ||
}) | ||
|
||
return ( | ||
<> | ||
<FormProvider {...formMethods}> | ||
<form onSubmit={formMethods.handleSubmit(onSubmit)} className={commonCss.form}> | ||
<TxCard> | ||
<Typography variant="h5">Trusted guardian</Typography> | ||
<Typography variant="body2"> | ||
Choosen a guardian, such as a hardware wallet or family member's wallet, that can initiate the | ||
recovery process in the future. | ||
</Typography> | ||
|
||
{/* TODO: Address field */} | ||
|
||
{/* TODO: Info button */} | ||
<Typography variant="h5">Recovery delay</Typography> | ||
<Typography variant="body2"> | ||
You can cancel any recovery attempt when it is not needed or wanted within the delay period. | ||
</Typography> | ||
|
||
{/* TODO: Delay field */} | ||
|
||
{/* TODO: Advanced options */} | ||
</TxCard> | ||
|
||
<TxCard> | ||
{/* TODO: Recommended badge */} | ||
|
||
<Typography variant="h5">Receive email updates</Typography> | ||
<Typography variant="body2">Get notified about any recovery initiations and their statuses.</Typography> | ||
|
||
{/* TODO: Email address field */} | ||
|
||
{/* TODO: Tenderly logo */} | ||
|
||
<Divider className={commonCss.nestedDivider} /> | ||
|
||
<CardActions sx={{ mt: '0 !important' }}> | ||
<Button variant="contained" type="submit"> | ||
Next | ||
</Button> | ||
</CardActions> | ||
</TxCard> | ||
</form> | ||
</FormProvider> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters