UNPKG

react-ui-animate

Version:
18 lines (17 loc) 794 B
import { ReactNode } from 'react'; import type { MotionValue } from '@raidipesh78/re-motion'; import type { Primitive } from '../types'; import { type ConfigMulti, type ConfigSingle } from '../hooks/useMount'; interface MountPropsSingle<T extends Primitive> extends Partial<ConfigSingle<T>> { state: boolean; children: (animation: MotionValue<T>) => ReactNode; } interface MountPropsMulti<I extends Record<string, Primitive>> extends ConfigMulti<I> { state: boolean; children: (animation: { [K in keyof I]: MotionValue<I[K]>; }) => ReactNode; } export declare function Mount<T extends Primitive = number>(props: MountPropsSingle<T>): JSX.Element; export declare function Mount<I extends Record<string, Primitive>>(props: MountPropsMulti<I>): JSX.Element; export {};