Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 3x 3x 3x 3x 3x 18x 18x | import Button from "components/Button";
import {
Dialog,
DialogActions,
DialogContent,
DialogTitle,
} from "components/Dialog";
import { useTranslation } from "i18n";
import { GLOBAL } from "i18n/namespaces";
interface ConnectionActionDialogProps {
dialogConfirm: string;
dialogId: string;
dialogMessage: string;
dialogTitle: string;
isLoading: boolean;
isOpen: boolean;
onClose: () => void;
onConfirm: () => void;
}
const ConnectionActionDialog = ({
dialogConfirm,
dialogId,
dialogMessage,
dialogTitle,
isLoading,
isOpen,
onClose,
onConfirm,
}: ConnectionActionDialogProps) => {
const { t } = useTranslation([GLOBAL]);
return (
<Dialog aria-labelledby={dialogId} open={isOpen} onClose={onClose}>
<DialogTitle id={dialogId}>{dialogTitle}</DialogTitle>
<DialogContent>{dialogMessage}</DialogContent>
<DialogActions>
<Button variant="outlined" onClick={onClose}>
{t("cancel")}
</Button>
<Button variant="contained" loading={isLoading} onClick={onConfirm}>
{dialogConfirm}
</Button>
</DialogActions>
</Dialog>
);
};
export default ConnectionActionDialog;
|