({ children, menuItems }: MenuBarProps)
| 20 | } |
| 21 | |
| 22 | export const MenuBar = ({ children, menuItems }: MenuBarProps): React.ReactElement => { |
| 23 | return ( |
| 24 | <nav id="menubar"> |
| 25 | <div className="menubar-left"> |
| 26 | <Menu> |
| 27 | <MenuButton |
| 28 | aria-label="Options" |
| 29 | as={IconButton} |
| 30 | icon={<HamburgerIcon />} |
| 31 | variant="ghost" |
| 32 | size={'sm'} |
| 33 | fontSize={'md'} |
| 34 | p={2} |
| 35 | ></MenuButton> |
| 36 | <MenuList> |
| 37 | {menuItems.map((menuItem) => { |
| 38 | return ( |
| 39 | <MenuItem key={menuItem.name} onClick={menuItem.onClick} isDisabled={menuItem.disabled}> |
| 40 | {menuItem.name} |
| 41 | </MenuItem> |
| 42 | ) |
| 43 | })} |
| 44 | </MenuList> |
| 45 | </Menu> |
| 46 | <Button as={Link} to="/" variant="ghost" size={'sm'} fontSize={'md'}> |
| 47 | Home |
| 48 | </Button> |
| 49 | </div> |
| 50 | <div className="menubar-center">{children}</div> |
| 51 | <div className="menubar-right"></div> |
| 52 | </nav> |
| 53 | ) |
| 54 | } |
nothing calls this directly
no outgoing calls
no test coverage detected