UNPKG

denwa-web-shared

Version:

A shared library for Next.js App Router projects containing reusable components, hooks, schemas, and utilities.

18 lines (17 loc) 839 B
import { MotionProps, Easing } from 'motion/react'; type MarginValue = `${number}${'px' | '%'}`; export interface UseAppearAnimationProps { once?: boolean; margin?: MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`; delay?: number; direction?: 'up' | 'down' | 'left' | 'right' | 'scale' | 'fade'; animationDistance?: number; duration?: number; ease?: Easing | Easing[]; } export declare const useAppearAnimation: <T extends HTMLElement = HTMLElement>({ once, margin, delay, direction, animationDistance, duration, ease, }?: UseAppearAnimationProps) => { ref: import('../../../node_modules/react').RefObject<T | null>; isInView: boolean; motionProps: Omit<MotionProps, "ref">; }; export {};