Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/file-explorer/file-explorer-header.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 935 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/file-explorer/file-explorer-header.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/file-explorer/file-explorer-header.tsx
-
curl -L -o file-explorer-header.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/file-explorer/file-explorer-header.tsx
935 Bytes
| import { useTranslation } from "react-i18next"; | |
| import { I18nKey } from "#/i18n/declaration"; | |
| import { cn } from "#/utils/utils"; | |
| import { ExplorerActions } from "./file-explorer-actions"; | |
| interface FileExplorerHeaderProps { | |
| isOpen: boolean; | |
| onToggle: () => void; | |
| onRefreshWorkspace: () => void; | |
| } | |
| export function FileExplorerHeader({ | |
| isOpen, | |
| onToggle, | |
| onRefreshWorkspace, | |
| }: FileExplorerHeaderProps) { | |
| const { t } = useTranslation(); | |
| return ( | |
| <div | |
| className={cn( | |
| "sticky top-0 bg-base-secondary", | |
| "flex items-center", | |
| !isOpen ? "justify-center" : "justify-between", | |
| )} | |
| > | |
| {isOpen && ( | |
| <div className="text-neutral-300 font-bold text-sm"> | |
| {t(I18nKey.EXPLORER$LABEL_WORKSPACE)} | |
| </div> | |
| )} | |
| <ExplorerActions | |
| isHidden={!isOpen} | |
| toggleHidden={onToggle} | |
| onRefresh={onRefreshWorkspace} | |
| /> | |
| </div> | |
| ); | |
| } | |