Jamjar/src/components/editor/EditorMenuButton.tsx
2025-01-19 13:38:18 -05:00

32 lines
581 B
TypeScript

"use client";
import { Button } from "@nextui-org/react";
type EditorMenuButtonProps = {
onClick: () => void;
isActive: boolean;
disabled?: boolean;
children: React.ReactNode;
};
export default function EditorMenuButton({
onClick,
isActive,
disabled,
children,
}: EditorMenuButtonProps) {
return (
<Button
variant="light"
onPress={onClick}
isDisabled={disabled}
size="sm"
isIconOnly
className={`${
isActive ? "bg-blue-500 data-[hover=true]:bg-blue-400" : ""
}`}
>
{children}
</Button>
);
}