Files
copilotkit--copilotkit/examples/showcases/presentation/src/app/components/buttons/NavButton.tsx
T
2026-07-13 12:58:18 +08:00

26 lines
578 B
TypeScript

import clsx from "clsx";
interface NavButtonProps {
children: React.ReactNode;
onClick?: () => void;
disabled?: boolean;
}
export function NavButton({ children, onClick, disabled }: NavButtonProps) {
return (
<button
onClick={onClick}
disabled={disabled}
className={clsx(
"w-7 h-7 border border-white rounded-md flex justify-center items-center",
"focus:outline-none",
disabled
? "opacity-40 cursor-not-allowed"
: "hover:bg-white hover:text-black",
)}
>
{children}
</button>
);
}