one-click-accessibility/modules/settings/assets/js/layouts/sidebar.js
Pavlo Kniazevych 82499ee78c
Fix: Fix the QA bugs [n/a] (#138)
* New: Finish the BE integration [n/a]

* Fix: Fix some bugs [n/a]
2025-01-19 13:11:09 +02:00

38 lines
799 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';
const Sidebar = () => {
const { openSidebar } = useSettings();
return (
<Drawer
variant="permanent"
open={openSidebar}
sx={{ width: 'auto' }}
PaperProps={{
sx: {
position: 'relative',
minWidth: '120px',
maxWidth: '300px',
width: openSidebar ? '100%' : '0',
transition: 'all 0.3s',
height: '100%',
justifyContent: 'space-between',
padding: 1.5,
paddingTop: 0,
},
}}
>
<Box>
<SidebarAppBar />
<SidebarMenu />
</Box>
<MyAccountMenu drawerState={openSidebar} />
</Drawer>
);
};
export default Sidebar;