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
38 lines
914 B
JavaScript
38 lines
914 B
JavaScript
import Alert from '@elementor/ui/Alert';
|
|
import Snackbar from '@elementor/ui/Snackbar';
|
|
import { useNotificationSettings } from '@ea11y-apps/global/hooks/use-notifications';
|
|
|
|
const Notifications = ({ type, message }) => {
|
|
const {
|
|
showNotification,
|
|
setShowNotification,
|
|
setNotificationMessage,
|
|
setNotificationType,
|
|
} = useNotificationSettings();
|
|
|
|
const closeNotification = () => {
|
|
setShowNotification(!showNotification);
|
|
setNotificationMessage('');
|
|
setNotificationType('');
|
|
};
|
|
|
|
return (
|
|
<Snackbar
|
|
open={showNotification}
|
|
autoHideDuration={type === 'error' ? 10000 : 2000}
|
|
onClose={closeNotification}
|
|
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
sx={{ zIndex: 99999 }}
|
|
>
|
|
<Alert
|
|
onClose={() => setShowNotification(!showNotification)}
|
|
severity={type}
|
|
variant="filled"
|
|
>
|
|
{message}
|
|
</Alert>
|
|
</Snackbar>
|
|
);
|
|
};
|
|
|
|
export default Notifications;
|