mosaicmap/components/glass-button.tsx
2025-08-26 14:44:00 +08:00

29 lines
701 B
TypeScript

import React from "react";
export interface GlassButtonProps {
children: React.ReactNode;
onClick?: () => void;
className?: string;
disabled?: boolean;
type?: "button" | "submit" | "reset";
}
export const GlassButton: React.FC<GlassButtonProps> = ({
children,
onClick,
className = "",
disabled = false,
type = "button",
}) => {
return (
<button
type={type}
onClick={onClick}
disabled={disabled}
className={`bg-black/20 backdrop-blur-xl rounded-xl shadow-2xl overflow-hidden border border-white/10 ${disabled ? "opacity-50 cursor-not-allowed" : "hover:[transform:translateZ(2em)]"
} ${className}`}
>
{children}
</button>
);
};