UNPKG

react-textmotion

Version:

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

21 lines (20 loc) 834 B
import type { Motion, Preset } from '../../types'; type UseResolvedMotionProps = { motion?: Motion; preset?: Preset[]; }; /** * @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 `Motion` object. * If a `motion` object is provided, it will be deep-copied. * If neither is provided, an empty object will be returned. * * @param {Motion} [motion] - A custom motion configuration object. * @param {Preset[]} [preset] - An array of animation presets. * * @returns {Motion} The resolved motion configuration object. */ export declare const useResolvedMotion: ({ motion, preset }: UseResolvedMotionProps) => Motion; export {};