one-click-accessibility/modules/settings/assets/js/components/sidebar-app-bar/index.js
Nirbhay Singh 27bfa67219
Update/app 1029 app name (#173)
* update: plugin name

* update: default menu option

* update: menu structure

* update: add inline checks

* update: reduce padding on app icon in menu

* fix: height of the modal

* update: app menu icon color

* update: menu icon colors

* fix: menu icon size

* update: plugin names

* update: HELP_LINK

* update: app name

* update: icon background color

* update: icon size

* fix: admin icon size

* fix: width of the sidebar
2025-02-10 20:14:53 +05:30

54 lines
1.3 KiB
JavaScript

import AppBar from '@elementor/ui/AppBar';
import Box from '@elementor/ui/Box';
import IconButton from '@elementor/ui/IconButton';
import Toolbar from '@elementor/ui/Toolbar';
import Typography from '@elementor/ui/Typography';
import { styled } from '@elementor/ui/styles';
import { useSettings } from '@ea11y/hooks';
import { ElementorLogo, SquareRoundedChevronsLeft } from '@ea11y/icons';
import { __ } from '@wordpress/i18n';
const StyledHeading = styled(Box)`
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0;
width: 200px;
`;
const SidebarAppBar = () => {
const { openSidebar, setOpenSidebar } = useSettings();
return (
<AppBar position="static" color="transparent" elevation={0}>
<Toolbar
disableGutters
variant="dense"
sx={{ justifyContent: 'space-between' }}
>
<StyledHeading>
<ElementorLogo />
<Typography
variant="h6"
marginLeft={0.5}
display={!openSidebar ? 'none' : 'inherit'}
>
{__('Ally', 'pojo-accessibility')}
</Typography>
</StyledHeading>
<IconButton
color="inherit"
onClick={() => setOpenSidebar(!openSidebar)}
size="small"
>
<SquareRoundedChevronsLeft
sx={{ rotate: !openSidebar ? '180deg' : '0' }}
/>
</IconButton>
</Toolbar>
</AppBar>
);
};
export default SidebarAppBar;