UNPKG

react-textmotion

Version:

Lightweight yet powerful library that provides variable animation effects for React applications.

16 lines (15 loc) 794 B
import { AnimationPreset, MotionConfig } from '../../types'; /** * @description * `useResolvedMotion` is a custom hook that resolves the motion configuration. * It either uses the provided `motion` object or generates a configuration from the `preset` array. * If a `preset` is provided, it will be mapped to a `MotionConfig` object. * If a `motion` object is provided, it will be deep-copied. * If neither is provided, an empty object will be returned. * * @param {MotionConfig} [motion] - A custom motion configuration object. * @param {AnimationPreset[]} [preset] - An array of animation presets. * * @returns {MotionConfig} The resolved motion configuration object. */ export declare const useResolvedMotion: (motion?: MotionConfig, preset?: AnimationPreset[]) => MotionConfig;