mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-23 21:22:01 +08:00
* update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js Co-authored-by: VasylD <vasyld@elementor.red> * update: styling of component --------- Co-authored-by: VasylD <vasyld@elementor.red>
39 lines
857 B
JavaScript
39 lines
857 B
JavaScript
import Box from '@elementor/ui/Box';
|
|
import Drawer from '@elementor/ui/Drawer';
|
|
import { MyAccountMenu, SidebarAppBar, SidebarMenu } from '@ea11y/components';
|
|
import { useSettings } from '@ea11y/hooks';
|
|
import { QuotaBar } from '@ea11y/layouts';
|
|
|
|
const Sidebar = () => {
|
|
const { openSidebar } = useSettings();
|
|
|
|
return (
|
|
<Drawer
|
|
variant="permanent"
|
|
open={openSidebar}
|
|
sx={{ width: 'auto' }}
|
|
PaperProps={{
|
|
sx: {
|
|
position: 'relative',
|
|
width: !openSidebar ? '120px' : '260px',
|
|
transition: 'all 0.3s',
|
|
height: '100%',
|
|
justifyContent: 'space-between',
|
|
paddingTop: 0,
|
|
overflow: 'visible',
|
|
},
|
|
}}
|
|
>
|
|
<Box padding={1.5}>
|
|
<SidebarAppBar />
|
|
<SidebarMenu />
|
|
</Box>
|
|
<Box>
|
|
<QuotaBar />
|
|
<MyAccountMenu drawerState={openSidebar} />
|
|
</Box>
|
|
</Drawer>
|
|
);
|
|
};
|
|
|
|
export default Sidebar;
|