📝 update breadcrumbs , nav for mobile and homepage translations
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 21s
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Successful in 16s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Successful in 1m4s
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Successful in 55s
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 21s
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Successful in 16s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Successful in 1m4s
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Successful in 55s
This commit was merged in pull request #17.
This commit is contained in:
43
components/effects/glitch-button.tsx
Normal file
43
components/effects/glitch-button.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
'use client'
|
||||
|
||||
import React from 'react'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
interface GlitchButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
children: React.ReactNode
|
||||
variant?: 'default' | 'subtle'
|
||||
glitchColor?: 'cyan' | 'pink' | 'purple' | 'magenta'
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
export function GlitchButton({
|
||||
children,
|
||||
variant = 'default',
|
||||
glitchColor = 'cyan',
|
||||
disabled = false,
|
||||
className,
|
||||
...props
|
||||
}: GlitchButtonProps) {
|
||||
const glitchClasses = !disabled
|
||||
? cn('glitch-btn-cyber', variant === 'subtle' && 'glitch-btn-subtle', 'relative')
|
||||
: ''
|
||||
|
||||
const overlayColorClass = {
|
||||
cyan: '',
|
||||
pink: 'glitch-overlay-pink',
|
||||
purple: 'glitch-overlay-purple',
|
||||
magenta: 'glitch-overlay-magenta',
|
||||
}[glitchColor]
|
||||
|
||||
return (
|
||||
<button className={cn(glitchClasses, className)} disabled={disabled} {...props}>
|
||||
{children}
|
||||
|
||||
{!disabled && (
|
||||
<div className={cn('glitch-overlay', overlayColorClass)} aria-hidden="true">
|
||||
{children}
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user