mirror of
https://github.com/fleetdm/fleet
synced 2026-04-27 00:17:21 +00:00
* New query pack table renders * services/entities created/updated with 5+ needed APIs requests for EditPacksPage * Refactor jsx to tsx PackQueriesListWrapper, EditPackForm, EditPackPage * Refactor to new patterns on useQuery, useEffect, and useState * Refactor to new pattern formData formatting * Edit, remove pack query modals * e2e test: packflow built to test create, update, delete of pack, fix brittle teamflow
43 lines
1 KiB
TypeScript
43 lines
1 KiB
TypeScript
import React from "react";
|
|
|
|
import Modal from "components/modals/Modal";
|
|
import Button from "components/buttons/Button";
|
|
|
|
const baseClass = "remove-query-modal";
|
|
|
|
interface IRemoveQueryModalProps {
|
|
onCancel: () => void;
|
|
onSubmit: () => void;
|
|
}
|
|
|
|
const RemoveQueryModal = ({
|
|
onCancel,
|
|
onSubmit,
|
|
}: IRemoveQueryModalProps): JSX.Element => {
|
|
return (
|
|
<Modal title={"Remove query"} onExit={onCancel} className={baseClass}>
|
|
<div className={baseClass}>
|
|
Are you sure you want to remove the selected queries from your pack?
|
|
<div className={`${baseClass}__btn-wrap`}>
|
|
<Button
|
|
className={`${baseClass}__btn`}
|
|
type="button"
|
|
variant="alert"
|
|
onClick={onSubmit}
|
|
>
|
|
Remove
|
|
</Button>
|
|
<Button
|
|
className={`${baseClass}__btn`}
|
|
onClick={onCancel}
|
|
variant="inverse-alert"
|
|
>
|
|
Cancel
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
export default RemoveQueryModal;
|