-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathTransitionablePortal.d.ts
More file actions
65 lines (53 loc) · 1.88 KB
/
TransitionablePortal.d.ts
File metadata and controls
65 lines (53 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import * as React from 'react'
import { TransitionProps, TRANSITION_STATUSES } from '../../modules/Transition/Transition'
import { PortalProps } from '../Portal/Portal'
export interface TransitionablePortalProps extends StrictTransitionablePortalProps {
[key: string]: any
}
export interface StrictTransitionablePortalProps {
/** Primary content. */
children: React.ReactNode
/**
* Called when a close event happens.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} props - All props.
* @param {object} state - Internal state.
*/
onClose?: (nothing: null, props: PortalProps, state: TransitionablePortalState) => void
/**
* Callback on each transition that changes visibility to hidden.
*
* @param {null}
* @param {object} props - All props.
* @param {object} state - Internal state.
*/
onHide?: (nothing: null, props: TransitionProps, state: TransitionablePortalState) => void
/**
* Called when an open event happens.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} props - All props.
* @param {object} state - Internal state.
*/
onOpen?: (nothing: null, props: PortalProps, state: TransitionablePortalState) => void
/**
* Callback on animation start.
*
* @param {null}
* @param {object} props - All props.
* @param {object} state - Internal state.
*/
onStart?: (nothing: null, props: TransitionProps, state: TransitionablePortalState) => void
/** Controls whether or not the portal is displayed. */
open?: boolean
/** Transition props. */
transition?: TransitionProps
}
export interface TransitionablePortalState {
transitionStatus: TRANSITION_STATUSES
portalOpen: boolean
transitionVisible: boolean
}
declare const TransitionablePortal: React.ComponentClass<TransitionablePortalProps>
export default TransitionablePortal