one-click-accessibility/modules/settings/assets/js/components/edit-link/index.js
VasylD f0dce2793e
[APP-1923][APP-1924] manage remediations, global remediations (#424)
* [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
2025-11-10 16:25:45 +07:00

55 lines
1.3 KiB
JavaScript

import EditIcon from '@elementor/icons/EditIcon';
import IconButton from '@elementor/ui/IconButton';
import Tooltip from '@elementor/ui/Tooltip';
import { useSettings } from '@ea11y/hooks';
import { __ } from '@wordpress/i18n';
import { addQueryArgs } from '@wordpress/url';
import { openLink } from '../../utils';
const EditLink = () => {
const { accessibilityStatementData } = useSettings();
const handleEdit = () => {
const adminUrl = window?.ea11ySettingsData?.adminUrl;
const url = addQueryArgs(`${adminUrl}post.php`, {
post: accessibilityStatementData?.pageId,
action: 'edit',
});
openLink(url);
};
return (
<Tooltip
placement="top"
title={__('Edit page', 'pojo-accessibility')}
arrow
PopperProps={{
modifiers: [
{
name: 'offset',
options: {
offset: [0, -16], // Adjusts the vertical (top) margin
},
},
{
name: 'zIndex',
enabled: true,
phase: 'beforeWrite',
fn: ({ state }) => {
state.styles.popper.zIndex = '99999'; // Apply zIndex to the Popper element
},
},
],
}}
>
<IconButton
onClick={handleEdit}
sx={{ marginLeft: 1 }}
aria-label="Edit accessibility statement page"
>
<EditIcon />
</IconButton>
</Tooltip>
);
};
export default EditLink;