Add src/hooks/useCardAnimation.ts
This commit is contained in:
18
src/hooks/useCardAnimation.ts
Normal file
18
src/hooks/useCardAnimation.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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 {};
|
||||
};
|
||||
Reference in New Issue
Block a user