OpenHands/frontend/src/components/shared/buttons/editor-action-button.tsx
Mislav Lukach b7da65d373
chore(ui): update tailwind (#9049)
Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
2025-06-10 18:20:04 +00:00

30 lines
632 B
TypeScript

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-sm w-20",
"hover:bg-tertiary disabled:opacity-50 disabled:cursor-not-allowed",
className,
)}
>
{children}
</button>
);
}