28 lines
741 B
TypeScript
28 lines
741 B
TypeScript
import React, { useRef } from 'react';
|
|
import { useCardAnimation, UseCardAnimationOptions } from '@/hooks/useCardAnimation';
|
|
|
|
interface TimelineProcessFlowProps {
|
|
children: React.ReactNode;
|
|
containerClassName?: string;
|
|
}
|
|
|
|
export const TimelineProcessFlow: React.FC<TimelineProcessFlowProps> = ({ children, containerClassName = '' }) => {
|
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
const itemRefs = useRef<(HTMLDivElement | null)[]>([]);
|
|
|
|
const animationOptions: UseCardAnimationOptions = {
|
|
containerRef,
|
|
itemRefs,
|
|
};
|
|
|
|
const { } = useCardAnimation(animationOptions);
|
|
|
|
return (
|
|
<div ref={containerRef} className={containerClassName}>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default TimelineProcessFlow;
|