Function
FadeIn
({ className, children }: Props)
Source from the content-addressed store, hash-verified
| 7 | }; |
| 8 | |
| 9 | export function FadeIn({ className, children }: Props) { |
| 10 | const ref = useRef<HTMLDivElement>(null); |
| 11 | useEffect(() => { |
| 12 | if (ref.current) { |
| 13 | ref.current.classList.remove('opacity-0'); |
| 14 | ref.current.classList.add('opacity-100'); |
| 15 | } |
| 16 | }, []); |
| 17 | return ( |
| 18 | <div |
| 19 | className={cn('opacity-0 transition-opacity duration-500', className)} |
| 20 | ref={ref} |
| 21 | > |
| 22 | {children} |
| 23 | </div> |
| 24 | ); |
| 25 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected