diff --git a/src/components/ConfirmationModal/ConfirmationModal.tsx b/src/components/ConfirmationModal/ConfirmationModal.tsx index 41edfe55e..cc880be08 100644 --- a/src/components/ConfirmationModal/ConfirmationModal.tsx +++ b/src/components/ConfirmationModal/ConfirmationModal.tsx @@ -3,6 +3,7 @@ import type { ReactNode } from "react"; import { PropsWithSpread, ValueOf } from "types"; import Button, { ButtonAppearance } from "components/Button"; import Modal, { ModalProps } from "components/Modal"; +import ActionButton from "components/ActionButton"; export type Props = PropsWithSpread< { @@ -30,6 +31,14 @@ export type Props = PropsWithSpread< * Function to perform the action prompted by the modal. */ onConfirm: (event: MouseEvent) => void; + /** + * Whether the confirm button should be in the loading state. + */ + confirmButtonLoading?: boolean; + /** + * Whether the confirm button should be disabled. + */ + confirmButtonDisabled?: boolean; }, Omit >; @@ -41,6 +50,8 @@ export const ConfirmationModal = ({ confirmButtonLabel, confirmExtra, onConfirm, + confirmButtonLoading, + confirmButtonDisabled, ...props }: Props): ReactElement => { const handleClick = @@ -65,13 +76,15 @@ export const ConfirmationModal = ({ > {cancelButtonLabel} - + } {...props}