@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
23 lines (22 loc) • 791 B
TypeScript
import * as React from "react";
export declare type useAnimationProps = {
visible: boolean;
};
export declare const useAnimation: (props: useAnimationProps) => {
state: TransitionState;
animating: boolean;
onEnd: (event: React.SyntheticEvent) => void;
};
export declare type useAnimationReturnType = ReturnType<typeof useAnimation>;
export declare type TransitionState = "enter" | "leave" | null;
export declare function getElementHeight(el: React.RefObject<HTMLElement> | {
current?: {
scrollHeight: number;
};
}): string | number;
export declare function getElementWidth(el: React.RefObject<HTMLElement> | {
current?: {
scrollWidth: number;
};
}): string | number;
export declare function getAutoSizeDuration(size: number | string): number;