Spaces:
Configuration error
Configuration error
Download frontend/src/components/shared/buttons/editor-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/editor-action-button.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/shared/buttons/editor-action-button.tsx
-
curl -L -o editor-action-button.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/shared/buttons/editor-action-button.tsx
629 Bytes
| import { cn } from "#/utils/utils"; | |
| interface EditorActionButtonProps { | |
| onClick: () => void; | |
| disabled: boolean; | |
| className: React.HTMLAttributes<HTMLButtonElement>["className"]; | |
| } | |
| export function EditorActionButton({ | |
| onClick, | |
| disabled, | |
| className, | |
| children, | |
| }: React.PropsWithChildren<EditorActionButtonProps>) { | |
| return ( | |
| <button | |
| type="button" | |
| onClick={onClick} | |
| disabled={disabled} | |
| className={cn( | |
| "text-sm py-0.5 rounded w-20", | |
| "hover:bg-tertiary disabled:opacity-50 disabled:cursor-not-allowed", | |
| className, | |
| )} | |
| > | |
| {children} | |
| </button> | |
| ); | |
| } | |