feat: add canvas-confetti integration and AuroraButton component; enhance UI with animations and improve button interactions
This commit is contained in:
23
src/components/effect/aurora-button.tsx
Normal file
23
src/components/effect/aurora-button.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
// components/ui/aurora-button.tsx
|
||||
import { Button } from "@/components/ui/button"
|
||||
|
||||
export function AuroraButton({
|
||||
loading,
|
||||
children,
|
||||
...props
|
||||
}: React.ComponentProps<typeof Button> & { loading?: boolean }) {
|
||||
return (
|
||||
<Button
|
||||
{...props}
|
||||
className={`${props.className ?? ""} relative overflow-hidden`}
|
||||
disabled={props.disabled || loading}
|
||||
>
|
||||
{loading && (
|
||||
<span className="absolute inset-0 animate-aurora" />
|
||||
)}
|
||||
<span className="relative z-10">
|
||||
{loading ? "Pensando…" : children}
|
||||
</span>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user