mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 17:28:54 +00:00
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import React from "react";
|
|
|
|
import Modal from "components/Modal";
|
|
import Button from "components/buttons/Button";
|
|
|
|
const baseClass = "remove-scheduled-query-modal";
|
|
|
|
interface IRemoveScheduledQueryModalProps {
|
|
isUpdatingScheduledQuery: boolean;
|
|
onCancel: () => void;
|
|
onSubmit: () => void;
|
|
}
|
|
|
|
const RemoveScheduledQueryModal = ({
|
|
isUpdatingScheduledQuery,
|
|
onCancel,
|
|
onSubmit,
|
|
}: IRemoveScheduledQueryModalProps): JSX.Element => {
|
|
return (
|
|
<Modal
|
|
title={"Remove scheduled query"}
|
|
onExit={onCancel}
|
|
onEnter={onSubmit}
|
|
className={baseClass}
|
|
>
|
|
<div className={baseClass}>
|
|
Are you sure you want to remove the selected queries from the schedule?
|
|
<div className="modal-cta-wrap">
|
|
<Button
|
|
type="button"
|
|
variant="alert"
|
|
onClick={onSubmit}
|
|
className="remove-loading"
|
|
isLoading={isUpdatingScheduledQuery}
|
|
>
|
|
Remove
|
|
</Button>
|
|
<Button onClick={onCancel} variant="inverse-alert">
|
|
Cancel
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
export default RemoveScheduledQueryModal;
|