import React from 'react';
type TransitionStyleProps = React.CSSProperties;
type TransitionStyleFn = (el: HTMLElement) => TransitionStyleProps;
type TransitionStyle = TransitionStyleProps | TransitionStyleFn;
export type AdvancedTransitionStyle = {
enter: TransitionStyle;
exit: TransitionStyle;
};
type AdvancedTransitionTimeout = {
enter: number;
exit: number;
};
export type TransitionTimeout = number | AdvancedTransitionTimeout;
export type TransitionProps = {
children: React.ReactElement;
/** `in` prop corresponds to the open/close state */
in: boolean;
/** Add a transition phase at initial mount of component.
* Pass `false` to remove transition at intial mount */
appear?: boolean;
/** The duration of the transition, in milliseconds. A single timeout for all transitions
* can be specified, or individual for `enter` / `exit`. */
timeout?: TransitionTimeout;
/** Style for the transition effect */
style: AdvancedTransitionStyle;
/** Callback that will be fired after the completion of the `enter` transition */
onEnter?: () => void;
/** Callback that will be fired after the completion of the `exit` transition */
onExit?: () => void;
unmountOnExit?: boolean;
};
/**
* Transition helps make a UI expressive and easy to use.
* This is a helper component that enables us to provide initial and final state.
*/
declare const Transition: React.ForwardRefExoticComponent>;
export default Transition;