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 } from "@material-ui/core";
7 import { withDialog } from "~/store/dialog/with-dialog";
8 import { dialogActions } from "~/store/dialog/dialog-actions";
10 export const REMOVE_DIALOG = 'removeCollectionFilesDialog';
12 export const RemoveDialog = withDialog(REMOVE_DIALOG)(
14 <Dialog open={props.open}>
15 <DialogTitle>{`Removing ${props.data}`}</DialogTitle>
17 {`Are you sure you want to remove ${props.data}?`}
23 onClick={props.closeDialog}>
26 <Button variant='raised' color='primary'>
33 export const openRemoveDialog = (removedDataName: string) =>
34 dialogActions.OPEN_DIALOG({ id: REMOVE_DIALOG, data: removedDataName });