mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-24 04:01:35 +08:00
* add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import HelpIcon from '@elementor/icons/HelpIcon';
|
|
import AppBar from '@elementor/ui/AppBar';
|
|
import Link from '@elementor/ui/Link';
|
|
import Toolbar from '@elementor/ui/Toolbar';
|
|
import { styled } from '@elementor/ui/styles';
|
|
import { eventNames, mixpanelService } from '@ea11y/services';
|
|
import { __ } from '@wordpress/i18n';
|
|
import { GOLINKS } from '../../constants';
|
|
|
|
const StyledToolbar = styled(Toolbar)`
|
|
justify-content: end;
|
|
align-items: center;
|
|
flex-direction: row;
|
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
gap: 10px;
|
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
`;
|
|
|
|
const AdminTopBar = () => {
|
|
return (
|
|
<AppBar position="static">
|
|
<StyledToolbar variant="dense">
|
|
<Link
|
|
color="secondary"
|
|
underline="hover"
|
|
href={GOLINKS.HELP}
|
|
target="_blank"
|
|
sx={{ display: 'inline-flex', alignItems: 'center', gap: 1 }}
|
|
aria-label={__('Help', 'pojo-accessibility')}
|
|
onClick={() =>
|
|
mixpanelService.sendEvent(eventNames.helpButtonClicked, {
|
|
source: 'Header',
|
|
})
|
|
}
|
|
>
|
|
<HelpIcon />
|
|
</Link>
|
|
</StyledToolbar>
|
|
</AppBar>
|
|
);
|
|
};
|
|
|
|
export default AdminTopBar;
|