
* New ConfirmButton component * Update macaw ui * Remove old confim button * New confirm button * Replace all place with new confirm button * Remove ConfirmButtonTransitionState use from mcaw * Does not change button width when showing loader and success state * Test ConfirmButton * Remove story, update tests * WIP change pull_request to push for chromatic * Revert "WIP change pull_request to push for chromatic" This reverts commit 8f0909bf54f185898a7f1d236f072d6544fd5d86. * Add comments * Remove css prop from DialogTable * Make confirm button larger in order send refund
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import ActionDialog from "@dashboard/components/ActionDialog";
|
|
import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton";
|
|
import { DialogContentText } from "@material-ui/core";
|
|
import React from "react";
|
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
|
|
import messages from "./messages";
|
|
|
|
export interface BulkAttributeUnassignDialogProps {
|
|
title: string;
|
|
attributeQuantity: number;
|
|
confirmButtonState: ConfirmButtonTransitionState;
|
|
open: boolean;
|
|
itemTypeName: string;
|
|
onClose: () => void;
|
|
onConfirm: () => void;
|
|
}
|
|
|
|
const BulkAttributeUnassignDialog: React.FC<
|
|
BulkAttributeUnassignDialogProps
|
|
> = ({
|
|
title,
|
|
attributeQuantity,
|
|
confirmButtonState,
|
|
open,
|
|
itemTypeName,
|
|
onClose,
|
|
onConfirm,
|
|
}) => {
|
|
const intl = useIntl();
|
|
|
|
return (
|
|
<ActionDialog
|
|
confirmButtonState={confirmButtonState}
|
|
open={open}
|
|
onClose={onClose}
|
|
onConfirm={onConfirm}
|
|
title={title}
|
|
confirmButtonLabel={intl.formatMessage(messages.confirmBtn)}
|
|
>
|
|
<DialogContentText>
|
|
<FormattedMessage
|
|
{...messages.content}
|
|
values={{
|
|
attributeQuantity: <strong>{attributeQuantity}</strong>,
|
|
counter: attributeQuantity,
|
|
itemTypeName: <strong>{itemTypeName}</strong>,
|
|
}}
|
|
/>
|
|
</DialogContentText>
|
|
</ActionDialog>
|
|
);
|
|
};
|
|
BulkAttributeUnassignDialog.displayName = "BulkAttributeUnassignDialog";
|
|
export default BulkAttributeUnassignDialog;
|