Download src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 906 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx
-
curl -L -o sidebar-mobile-menu-toggle.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx
906 Bytes
| import { useTranslation } from "react-i18next"; | |
| import { I18nKey } from "#/i18n/declaration"; | |
| import BlockDrawerLeftIcon from "#/icons/block-drawer-left.svg?react"; | |
| import { | |
| mobileTopBarIconButtonClassName, | |
| mobileTopBarIconClassName, | |
| } from "#/utils/mobile-top-bar-icon-button-classes"; | |
| import { useSidebarMobileNav } from "./sidebar-mobile-nav-context"; | |
| export function SidebarMobileMenuToggle() { | |
| const { t } = useTranslation("openhands"); | |
| const { isOpen, toggle } = useSidebarMobileNav(); | |
| return ( | |
| <button | |
| type="button" | |
| data-testid="sidebar-mobile-menu-toggle" | |
| onClick={toggle} | |
| aria-expanded={isOpen} | |
| aria-label={ | |
| isOpen ? t(I18nKey.SIDEBAR$CLOSE_MENU) : t(I18nKey.SIDEBAR$OPEN_MENU) | |
| } | |
| className={mobileTopBarIconButtonClassName} | |
| > | |
| <BlockDrawerLeftIcon className={mobileTopBarIconClassName} aria-hidden /> | |
| </button> | |
| ); | |
| } | |