one-click-accessibility/modules/scanner/assets/js/components/form-navigation/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

56 lines
1.6 KiB
JavaScript

import Box from '@elementor/ui/Box';
import Divider from '@elementor/ui/Divider';
import Pagination from '@elementor/ui/Pagination';
import { styled } from '@elementor/ui/styles';
import PropTypes from 'prop-types';
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
export const FormNavigation = ({ total, current, setCurrent }) => {
const { openedBlock } = useScannerWizardContext();
const onChange = (event, index) => {
setCurrent(index - 1);
mixpanelService.sendEvent(mixpanelEvents.navigationChanged, {
page: index,
category: openedBlock,
});
};
return (
<Box sx={{ minHeight: '65px' }}>
<StyledNavigationContainer>
<Divider />
<StyledBox>
<StyledNavigation>
<Pagination count={total} page={current + 1} onChange={onChange} />
</StyledNavigation>
</StyledBox>
</StyledNavigationContainer>
</Box>
);
};
const StyledNavigationContainer = styled(Box)`
position: fixed;
bottom: 0;
right: ${({ theme }) => theme.spacing(2)};
width: 393px;
background: ${({ theme }) => theme.palette.background.paper};
`;
const StyledBox = styled(Box)`
display: flex;
justify-content: center;
padding-block: ${({ theme }) => theme.spacing(2)};
`;
const StyledNavigation = styled(Box)`
display: flex;
justify-content: space-between;
align-items: center;
gap: ${({ theme }) => theme.spacing(2)};
`;
FormNavigation.propTypes = {
total: PropTypes.number.isRequired,
current: PropTypes.number.isRequired,
setCurrent: PropTypes.func.isRequired,
};