Add button

This commit is contained in:
killerboss 2024-10-27 14:50:02 +01:00
parent ec7280e266
commit 32161a3fbc

20
ui/Button.tsx Normal file
View file

@ -0,0 +1,20 @@
import React from "react";
import {useCursor} from "@/components/cursor";
import {cn} from "@/lib/utils";
export function Button ({ children, className }: { children?: React.ReactNode, className?: string }) {
const customCursor = useCursor();
return (
<button
className={cn(
"relative z-10 px-6 py-3 text-lg font-medium text-white rounded-full shadow-md transition-colors duration-100 hover:bg-white hover:text-black",
className
)}
onMouseEnter={() => customCursor.toggleCursor()}
onMouseLeave={() => customCursor.toggleCursor()}
onClick={() => customCursor.toggleCursorEnabled()}
>
{children}
</button>
)
}