mirror of
https://ghproxy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-07-21 12:16:59 +08:00
* [APP-1923] change remediation management (#411) * [APP-1988] Add tabs * [APP-1988][APP-1989] add tabs, remove menu item * [APP-1988][APP-1989] add tabs, remove menu item * [APP-1992] add empty state and tab navigation * [APP-1993][APP-1994] Change view for manage AI fixes, change delete confirmation modal * [APP-1996] add view for alt text fixes * [APP-1996] add edit for alt text fixes * [APP-1996] add edit for alt text fixes * [APP-1996] add edit for alt text fixes * [APP-1996] add edit for alt text fixes * [APP-1996] add edit for alt text fixes * [APP-1995] Color contrast form * [APP-2001] add global remediation logic (#415) * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2001] add global remediation logic * [APP-2003] add disable across scans (#418) * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * [APP-2003] add disable across scans * add logs * add logs * add logs * remove logs * remove logs * remove logs * remove logs * remove logs * remove logs * remove logs * remove logs * remove logs * remove logs * change to theme value * change to theme value * change to theme value * change to theme value * add edit mode * add edit mode * add edit mode
61 lines
1.6 KiB
JavaScript
61 lines
1.6 KiB
JavaScript
import AlertTriangleFilledIcon from '@elementor/icons/AlertTriangleFilledIcon';
|
|
import Button from '@elementor/ui/Button';
|
|
import Dialog from '@elementor/ui/Dialog';
|
|
import DialogActions from '@elementor/ui/DialogActions';
|
|
import DialogContent from '@elementor/ui/DialogContent';
|
|
import DialogHeader from '@elementor/ui/DialogHeader';
|
|
import Typography from '@elementor/ui/Typography';
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
const ConfirmDialog = ({
|
|
title,
|
|
onCancel,
|
|
onClose,
|
|
onApprove,
|
|
approveText = __('Submit', 'pojo-accessibility'),
|
|
cancelText = __('Cancel', 'pojo-accessibility'),
|
|
approveButtonColor = 'error',
|
|
approveButtonSize = 'medium',
|
|
children,
|
|
logo = <AlertTriangleFilledIcon color="error" />,
|
|
showCancelButton = true,
|
|
showApproveButton = true,
|
|
approveButtonDisabled = false,
|
|
showCloseButton = false,
|
|
dividers = false,
|
|
open = true,
|
|
...props
|
|
}) => {
|
|
return (
|
|
<Dialog open={open} onClose={onClose} {...props}>
|
|
<DialogHeader logo={logo} onClose={showCloseButton ? onClose : false}>
|
|
<Typography variant="subtitle1">{title}</Typography>
|
|
</DialogHeader>
|
|
|
|
<DialogContent dividers={dividers} sx={{ py: 1 }}>
|
|
{children}
|
|
</DialogContent>
|
|
|
|
<DialogActions>
|
|
{showCancelButton && (
|
|
<Button onClick={onCancel} color="secondary">
|
|
{cancelText}
|
|
</Button>
|
|
)}
|
|
{showApproveButton && (
|
|
<Button
|
|
variant="contained"
|
|
disabled={approveButtonDisabled}
|
|
color={approveButtonColor}
|
|
size={approveButtonSize}
|
|
onClick={onApprove}
|
|
>
|
|
{approveText}
|
|
</Button>
|
|
)}
|
|
</DialogActions>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export default ConfirmDialog;
|