mirror of
https://ghproxy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-07-22 12:27:13 +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
89 lines
2.2 KiB
JavaScript
89 lines
2.2 KiB
JavaScript
import DesktopIcon from '@elementor/icons/DesktopIcon';
|
|
import MobileIcon from '@elementor/icons/MobileIcon';
|
|
import Box from '@elementor/ui/Box';
|
|
import Grid from '@elementor/ui/Grid';
|
|
import Tab from '@elementor/ui/Tab';
|
|
import TabPanel from '@elementor/ui/TabPanel';
|
|
import Tabs from '@elementor/ui/Tabs';
|
|
import Typography from '@elementor/ui/Typography';
|
|
import { styled } from '@elementor/ui/styles';
|
|
import useTabs from '@elementor/ui/useTabs';
|
|
import {
|
|
PositionSettingsDesktop,
|
|
PositionSettingsMobile,
|
|
} from '@ea11y/layouts';
|
|
import { useState } from '@wordpress/element';
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
const TABS = {
|
|
one: 'one',
|
|
two: 'two',
|
|
};
|
|
|
|
export const PositionSettings = (props) => {
|
|
const [currentTab, setCurrentTab] = useState(TABS.one);
|
|
const { getTabProps } = useTabs(currentTab);
|
|
|
|
const changeTab = (tab) => () => {
|
|
setCurrentTab(tab);
|
|
};
|
|
|
|
return (
|
|
<StyledWrapper {...props}>
|
|
<Box marginBottom={2}>
|
|
<Typography variant="subtitle1">
|
|
{__('Position', 'pojo-accessibility')}
|
|
</Typography>
|
|
<Typography variant="body2">
|
|
{__(
|
|
'Decide where you want your accessibility button to appear across every page of your site so visitors can easily find it.',
|
|
'pojo-accessibility',
|
|
)}
|
|
</Typography>
|
|
</Box>
|
|
<Box padding={2}>
|
|
<Tabs
|
|
value={currentTab}
|
|
sx={{ borderBottom: 'none', height: '65px' }}
|
|
indicatorColor="secondary"
|
|
textColor="secondary"
|
|
>
|
|
<Tab
|
|
{...getTabProps(TABS.one)}
|
|
label="Desktop"
|
|
icon={<DesktopIcon />}
|
|
iconPosition="start"
|
|
onClick={changeTab(TABS.one)}
|
|
/>
|
|
<Tab
|
|
{...getTabProps(TABS.two)}
|
|
label="Mobile"
|
|
icon={<MobileIcon />}
|
|
iconPosition="start"
|
|
onClick={changeTab(TABS.two)}
|
|
/>
|
|
</Tabs>
|
|
</Box>
|
|
|
|
{currentTab === TABS.one ? (
|
|
<TabPanel>
|
|
<PositionSettingsDesktop />
|
|
</TabPanel>
|
|
) : (
|
|
<TabPanel>
|
|
<PositionSettingsMobile />
|
|
</TabPanel>
|
|
)}
|
|
</StyledWrapper>
|
|
);
|
|
};
|
|
|
|
export default PositionSettings;
|
|
|
|
const StyledWrapper = styled(Grid)`
|
|
padding: ${({ theme }) => theme.spacing(2)};
|
|
border: 1px solid ${({ theme }) => theme.palette.divider};
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
max-width: 1200px;
|
|
`;
|