38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import DialogContentText from "@material-ui/core/DialogContentText";
|
|
import React from "react";
|
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
|
|
import ActionDialog from "@saleor/components/ActionDialog";
|
|
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
|
|
|
export interface OrderMarkAsPaidDialogProps {
|
|
confirmButtonState: ConfirmButtonTransitionState;
|
|
open: boolean;
|
|
onClose: () => void;
|
|
onConfirm: () => void;
|
|
}
|
|
|
|
const OrderMarkAsPaidDialog: React.StatelessComponent<
|
|
OrderMarkAsPaidDialogProps
|
|
> = ({ confirmButtonState, onClose, onConfirm, open }) => {
|
|
const intl = useIntl();
|
|
|
|
return (
|
|
<ActionDialog
|
|
confirmButtonState={confirmButtonState}
|
|
open={open}
|
|
title={intl.formatMessage({
|
|
defaultMessage: "Mark Order as Paid",
|
|
description: "dialog header"
|
|
})}
|
|
onClose={onClose}
|
|
onConfirm={onConfirm}
|
|
>
|
|
<DialogContentText>
|
|
<FormattedMessage defaultMessage="Are you sure you want to mark this order as paid?" />
|
|
</DialogContentText>
|
|
</ActionDialog>
|
|
);
|
|
};
|
|
OrderMarkAsPaidDialog.displayName = "OrderMarkAsPaidDialog";
|
|
export default OrderMarkAsPaidDialog;
|