19 lines
564 B
TypeScript
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 {};
|
|
};
|