Files
3f2ead6d-8a2b-46e6-ba7c-e63…/src/hooks/useCardAnimation.ts

19 lines
564 B
TypeScript

import { useEffect, RefObject } from 'react';
export interface UseCardAnimationOptions {
containerRef: RefObject<HTMLDivElement>;
itemRefs: RefObject<(HTMLDivElement | null)[]>;
perspectiveRef?: RefObject<HTMLDivElement>;
bottomContentRef?: RefObject<HTMLDivElement>;
}
export const useCardAnimation = (options: UseCardAnimationOptions) => {
const { containerRef, itemRefs, perspectiveRef, bottomContentRef } = options;
useEffect(() => {
// Animation logic here
}, [containerRef, itemRefs, perspectiveRef, bottomContentRef]);
return {};
};