-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #651 from forbole/staging
v0.19.4 prod
- Loading branch information
Showing
40 changed files
with
771 additions
and
1,415 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { | ||
Button, | ||
Checkbox, | ||
DialogContent, | ||
FormControlLabel, | ||
Typography, | ||
Box, | ||
Link, | ||
useTheme, | ||
} from '@material-ui/core' | ||
import CircleUnchecked from '@material-ui/icons/RadioButtonUnchecked' | ||
import CircleCheckedFilled from '@material-ui/icons/CheckCircle' | ||
import useTranslation from 'next-translate/useTranslation' | ||
import Trans from 'next-translate/Trans' | ||
import React from 'react' | ||
import useStyles from './styles' | ||
import { CustomTheme } from '../../misc/theme' | ||
|
||
interface RequestPhraseDialogContentProps { | ||
onConfirm(): void | ||
consent: boolean | ||
setConsent: (value: boolean) => void | ||
title: string | ||
} | ||
|
||
const RequestPhraseDialogContent: React.FC<RequestPhraseDialogContentProps> = ({ | ||
onConfirm, | ||
consent, | ||
setConsent, | ||
title, | ||
}) => { | ||
const { t } = useTranslation('common') | ||
const classes = useStyles() | ||
const themeStyle: CustomTheme = useTheme() | ||
|
||
return ( | ||
<Box className={classes.requestBox}> | ||
<form | ||
noValidate | ||
onSubmit={(e) => { | ||
e.preventDefault() | ||
onConfirm() | ||
}} | ||
> | ||
<DialogContent className={classes.dialogContent}> | ||
<Typography>{title}</Typography> | ||
<Box className={classes.checkboxContent}> | ||
<FormControlLabel | ||
control={ | ||
<Checkbox | ||
icon={<CircleUnchecked />} | ||
checkedIcon={<CircleCheckedFilled />} | ||
style={{ | ||
color: themeStyle.palette.text.secondary, | ||
}} | ||
checked={consent} | ||
onChange={(e) => setConsent(e.target.checked)} | ||
/> | ||
} | ||
label={ | ||
<Trans | ||
i18nKey={t('private key consent')} | ||
components={[ | ||
<Typography | ||
variant="body2" | ||
style={{ | ||
fontSize: themeStyle.spacing(1.8), | ||
color: themeStyle.palette.text.secondary, | ||
}} | ||
/>, | ||
<Link | ||
href="https://medium.com/desmosnetwork/desmos-airdrop-faqs-d5107dd34f17#P6" | ||
target="_blank" | ||
style={{ | ||
fontSize: themeStyle.spacing(1.8), | ||
color: themeStyle.palette.text.secondary, | ||
textDecoration: 'underline', | ||
}} | ||
/>, | ||
]} | ||
/> | ||
} | ||
/> | ||
<Button | ||
fullWidth | ||
variant="contained" | ||
classes={{ root: classes.requestButton }} | ||
color="primary" | ||
disabled={!consent} | ||
type="submit" | ||
> | ||
{t('consent button')} | ||
</Button> | ||
</Box> | ||
</DialogContent> | ||
</form> | ||
</Box> | ||
) | ||
} | ||
|
||
export default RequestPhraseDialogContent |
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
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
Oops, something went wrong.