mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-23 18:27:48 +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
42 lines
909 B
JavaScript
42 lines
909 B
JavaScript
import Box from '@elementor/ui/Box';
|
|
import Divider from '@elementor/ui/Divider';
|
|
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,
|
|
},
|
|
}}
|
|
>
|
|
<Box padding={1.5}>
|
|
<SidebarAppBar />
|
|
<SidebarMenu />
|
|
</Box>
|
|
<Box>
|
|
<Divider />
|
|
<QuotaBar />
|
|
<Divider />
|
|
|
|
<MyAccountMenu drawerState={openSidebar} />
|
|
</Box>
|
|
</Drawer>
|
|
);
|
|
};
|
|
|
|
export default Sidebar;
|