Spaces:
Paused
Paused
| import { cn } from '@/lib/utils'; | |
| interface GlitchTextProps { | |
| text: string; | |
| className?: string; | |
| as?: 'h1' | 'h2' | 'h3' | 'p' | 'span'; | |
| } | |
| const GlitchText = ({ text, className, as: Component = 'span' }: GlitchTextProps) => { | |
| return ( | |
| <Component | |
| className={cn("glitch", className)} | |
| data-text={text} | |
| > | |
| {text} | |
| </Component> | |
| ); | |
| }; | |
| export default GlitchText; | |