-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.d.ts
24 lines (18 loc) · 1.03 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as React from 'react';
export type Layer = unknown;
export type LayerTransitionConfig = { keyframes: Keyframe[], timing: KeyframeAnimationOptions, mask?: CSSStyleDeclaration };
export type EventListenerHook = (listener: () => any, deps?: readonly any[]) => void;
export type Stack = React.FunctionComponent<{
layersState?: [Layer[], React.SetStateAction<Layer[]>];
style?: React.CSSProperties,
className?: string,
children?: React.ReactChildren | ((stack: React.ReactChildren) => React.ReactChildren);
}>;
export type createLayer = (children: React.ReactChildren, config?: LayerTransitionConfig) => Layer;
export type usePushLayer = () => (children: React.ReactChildren, config: LayerTransitionConfig) => void;
export type usePopLayer = () => (config?: LayerTransitionConfig) => void;
export type useWillFocusListener = EventListenerHook;
export type useDidFocusListener = EventListenerHook;
export type useWillBlurListener = EventListenerHook;
export type useDidBlurListener = EventListenerHook;
export default Stack;