Spaces:
Configuration error
Configuration error
Download frontend/src/components/shared/buttons/trajectory-action-button.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/shared/buttons/trajectory-action-button.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/shared/buttons/trajectory-action-button.tsx
-
curl -L -o trajectory-action-button.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/shared/buttons/trajectory-action-button.tsx
629 Bytes
| import { Tooltip } from "@heroui/react"; | |
| interface TrajectoryActionButtonProps { | |
| testId?: string; | |
| onClick: () => void; | |
| icon: React.ReactNode; | |
| tooltip?: string; | |
| } | |
| export function TrajectoryActionButton({ | |
| testId, | |
| onClick, | |
| icon, | |
| tooltip, | |
| }: TrajectoryActionButtonProps) { | |
| const button = ( | |
| <button | |
| type="button" | |
| data-testid={testId} | |
| onClick={onClick} | |
| className="button-base p-1 hover:bg-neutral-500" | |
| > | |
| {icon} | |
| </button> | |
| ); | |
| if (tooltip) { | |
| return ( | |
| <Tooltip content={tooltip} closeDelay={100}> | |
| {button} | |
| </Tooltip> | |
| ); | |
| } | |
| return button; | |
| } | |