mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
Co-authored-by: Darius Cepulis <dcepulis@mux.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
440 B
TypeScript
14 lines
440 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
import { useIntersection } from '@/hooks/useIntersection';
|
|
|
|
export function AnimatedBars({ children, className }: { children: ReactNode; className?: string }) {
|
|
const [ref, isIntersecting] = useIntersection({ threshold: 0.01, rootMargin: '0px 0px -25% 0px' });
|
|
|
|
return (
|
|
<div ref={ref} className={className} data-animate={isIntersecting ? '' : undefined}>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|