Skip to content

Commit

Permalink
added side menus
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshamoon committed Mar 8, 2024
1 parent 67ea670 commit 0a685a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/UI/Layout/Navigation/SideMenus/SideMenus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export interface SideMenusProps {
opened: boolean;
}

const AddAccordian = ({ defaultExpanded, summary, details, opened }: any) => (
<Accordion className={styles.Accordion} defaultExpanded={defaultExpanded}>
const AddAccordian = ({ summary, details, opened, expanded = false }: any) => (
<Accordion className={styles.Accordion} expanded={expanded}>
<AccordionSummary
className={styles.AccordionSummary}
classes={{
Expand Down Expand Up @@ -183,7 +183,7 @@ const SideMenus = ({ opened }: SideMenusProps) => {
selected={menu.children ? false : isSelected}
className={opened ? styles.OpenItem : styles.ClosedItem}
onClick={() => {
setParentMenu(menu.path);
setParentMenu(menu.path === parentMenu ? undefined : menu.path);
}}
classes={{
root: styles.IconItem,
Expand Down Expand Up @@ -221,8 +221,8 @@ const SideMenus = ({ opened }: SideMenusProps) => {
<AddAccordian
summary={listItemButton}
details={subMenu}
defaultExpanded={isSelected}
opened={opened}
expanded={isSelected}
/>
</div>
) : (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.Checkbox {
margin-top: 14px;
}

0 comments on commit 0a685a2

Please sign in to comment.