Download src/components/features/chat/remove-file-button.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 715 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/remove-file-button.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/chat/remove-file-button.tsx
-
curl -L -o remove-file-button.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/remove-file-button.tsx
715 Bytes
| import CloseIcon from "#/icons/u-close.svg?react"; | |
| import { cn, isMobileDevice } from "#/utils/utils"; | |
| interface RemoveFileButtonProps { | |
| onClick: () => void; | |
| } | |
| export function RemoveFileButton({ onClick }: RemoveFileButtonProps) { | |
| const isMobile = isMobileDevice(); | |
| return ( | |
| <button | |
| type="button" | |
| onClick={onClick} | |
| className={cn( | |
| "z-10 flex w-4 h-4 rounded-full items-center justify-center bg-[var(--oh-surface)] hover:bg-[var(--oh-muted)] cursor-pointer absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200", | |
| isMobile && "opacity-100", | |
| )} | |
| > | |
| <CloseIcon width={10} height={10} color="#ffffff" /> | |
| </button> | |
| ); | |
| } | |