UNPKG

1.19 kBTypeScriptView Raw
1/// <reference types="react" />
2import React from 'react';
3import { ViewStyle } from 'react-native';
4export interface IModalPropTypes {
5 wrapStyle?: ViewStyle;
6 maskStyle?: ViewStyle;
7 style?: {};
8 animationType: 'none' | 'fade' | 'slide-up' | 'slide-down';
9 animationDuration?: number;
10 visible: boolean;
11 maskClosable?: boolean;
12 animateAppear?: boolean;
13 onClose?: () => void;
14 onAnimationEnd?: (visible: boolean) => void;
15}
16export default class RCModal extends React.Component<IModalPropTypes, any> {
17 static defaultProps: IModalPropTypes;
18 animMask: any;
19 animDialog: any;
20 constructor(props: any);
21 componentWillReceiveProps(nextProps: any): void;
22 shouldComponentUpdate(nextProps: any, nextState: any): boolean;
23 componentDidMount(): void;
24 componentDidUpdate(prevProps: any): void;
25 animateMask: (visible: any) => void;
26 stopMaskAnim: () => void;
27 stopDialogAnim: () => void;
28 animateDialog: (visible: any) => void;
29 close: () => void;
30 onMaskClose: () => void;
31 getPosition: (visible: any) => number;
32 getScale: (visible: any) => 1 | 1.05;
33 getOpacity: (visible: any) => 0 | 1;
34 render(): any;
35}