mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-01 07:27:40 -08:00
* save work * fix perf issue on i18n rollup * fix reset styling * move body line-height from reset Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import Dialog from '@mui/material/Dialog';
|
|
import DialogContent from '@mui/material/DialogContent';
|
|
import DialogTitle from '@mui/material/DialogTitle';
|
|
import IconButton from '@mui/material/IconButton';
|
|
import CloseIcon from '@mui/icons-material/Close';
|
|
import Typography from '@mui/material/Typography';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { RequestPasswordResetForm } from 'forms';
|
|
|
|
import './RequestPasswordResetDialog.css';
|
|
|
|
const RequestPasswordResetDialog = ({ classes, handleClose, isOpen, onSubmit, skipTokenRequest }: any) => {
|
|
const { t } = useTranslation();
|
|
|
|
const handleOnClose = () => {
|
|
handleClose();
|
|
}
|
|
|
|
return (
|
|
<Dialog onClose={handleOnClose} open={isOpen}>
|
|
<DialogTitle className="dialog-title">
|
|
<Typography variant="h6">{ t('RequestPasswordResetDialog.title') }</Typography>
|
|
|
|
{handleOnClose ? (
|
|
<IconButton onClick={handleOnClose} size="large">
|
|
<CloseIcon />
|
|
</IconButton>
|
|
) : null}
|
|
</DialogTitle>
|
|
<DialogContent>
|
|
<RequestPasswordResetForm onSubmit={onSubmit} skipTokenRequest={skipTokenRequest}></RequestPasswordResetForm>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export default RequestPasswordResetDialog;
|