Download src/components/features/chat/chat-send-button.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/chat-send-button.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/chat/chat-send-button.tsx
-
curl -L -o chat-send-button.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/chat/chat-send-button.tsx
868 Bytes
| import { ArrowUp } from "lucide-react"; | |
| import { cn } from "#/utils/utils"; | |
| export interface ChatSendButtonProps { | |
| buttonClassName: string; | |
| handleSubmit: () => void; | |
| disabled: boolean; | |
| } | |
| export function ChatSendButton({ | |
| buttonClassName, | |
| handleSubmit, | |
| disabled, | |
| }: ChatSendButtonProps) { | |
| return ( | |
| <button | |
| type="button" | |
| className={cn( | |
| "flex items-center justify-center rounded-full border border-white size-8", | |
| disabled | |
| ? "cursor-not-allowed border-[var(--oh-muted)]" | |
| : "cursor-pointer hover:bg-white/10", | |
| buttonClassName, | |
| )} | |
| data-name="arrow-up-circle-fill" | |
| data-testid="submit-button" | |
| onClick={handleSubmit} | |
| disabled={disabled} | |
| > | |
| <ArrowUp | |
| className="w-4 h-4" | |
| color={disabled ? "var(--oh-muted)" : "white"} | |
| /> | |
| </button> | |
| ); | |
| } | |