Download src/components/features/home/shared/error-message.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 394 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/home/shared/error-message.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/home/shared/error-message.tsx
-
curl -L -o error-message.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/home/shared/error-message.tsx
394 Bytes
| import React from "react"; | |
| interface ErrorMessageProps { | |
| isError: boolean; | |
| message?: string; | |
| testId?: string; | |
| } | |
| export function ErrorMessage({ | |
| isError, | |
| message = "Failed to load data", | |
| testId = "dropdown-error", | |
| }: ErrorMessageProps) { | |
| if (!isError) return null; | |
| return ( | |
| <div className="text-red-500 text-sm mt-1" data-testid={testId}> | |
| {message} | |
| </div> | |
| ); | |
| } | |