1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { Dialog, DialogTitle, DialogContent, DialogActions, Button, DialogContentText } from "@material-ui/core";
7 import { WithDialogProps } from "../../store/dialog/with-dialog";
9 export interface ConfirmationDialogDataProps {
12 cancelButtonLabel?: string;
13 confirmButtonLabel?: string;
16 export interface ConfirmationDialogProps {
17 onConfirm: () => void;
20 export const ConfirmationDialog = (props: ConfirmationDialogProps & WithDialogProps<ConfirmationDialogDataProps>) =>
21 <Dialog open={props.open}>
22 <DialogTitle>{props.data.title}</DialogTitle>
32 onClick={props.closeDialog}>
33 {props.data.cancelButtonLabel || 'Cancel'}
39 onClick={props.onConfirm}>
40 {props.data.confirmButtonLabel || 'Ok'}