Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) - Use MUI dialog component for tx error Co-authored-by: IshaVenikar <ishavenikar7@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: cerc-io/laconic-wallet-web#6
27 lines
626 B
TypeScript
27 lines
626 B
TypeScript
import React from 'react';
|
|
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from '@mui/material';
|
|
|
|
const TxErrorDialog = ({
|
|
error,
|
|
visible,
|
|
hideDialog,
|
|
}: {
|
|
error: string;
|
|
visible: boolean;
|
|
hideDialog: () => void;
|
|
}) => {
|
|
return (
|
|
<Dialog open={visible} onClose={hideDialog}>
|
|
<DialogTitle>Transaction Error</DialogTitle>
|
|
<DialogContent>
|
|
<Typography variant="body1">{error}</Typography>
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<Button onClick={hideDialog}>OK</Button>
|
|
</DialogActions>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export default TxErrorDialog;
|