Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: IshaVenikar <ishavenikar7@gmail.com> Reviewed-on: cerc-io/laconic-wallet-web#9
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { Dialog, DialogActions, DialogContent, DialogTitle, Button, Typography } from '@mui/material';
|
|
|
|
import styles from '../styles/stylesheet';
|
|
import GridView from './Grid';
|
|
import { CustomDialogProps } from '../types';
|
|
|
|
const DialogComponent = ({ visible, hideDialog, contentText }: CustomDialogProps) => {
|
|
const words = contentText.split(' ');
|
|
|
|
const copyMnemonic = () => {
|
|
navigator.clipboard.writeText(contentText)
|
|
};
|
|
|
|
return (
|
|
<Dialog open={visible} onClose={hideDialog}>
|
|
<DialogTitle>Mnemonic</DialogTitle>
|
|
<DialogContent>
|
|
<Typography variant="h6" component="div" style={{ color: 'rgba(0, 0, 0, 0.87)' }}>
|
|
Your mnemonic provides full access to your wallet and funds. Make sure to note it down.
|
|
</Typography>
|
|
<Typography variant="h6" component="div" style={{ ...styles.dialogWarning }}>
|
|
Do not share your mnemonic with anyone
|
|
</Typography>
|
|
<GridView words={words} />
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<Button onClick={copyMnemonic}>Copy</Button>
|
|
<Button onClick={hideDialog}>Done</Button>
|
|
</DialogActions>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export { DialogComponent };
|