1- declare module 'react-native-simple-dialogs' {
2- import * as React from 'react' ;
3- import {
4- StyleProp ,
5- ViewStyle ,
6- TextStyle ,
7- } from 'react-native' ;
8-
9- type animationType = 'none' | 'slide' | 'fade' ;
10-
11- type supportedOrientationsType =
12- | 'portrait'
13- | 'portrait-upside-down'
14- | 'landscape'
15- | 'landscape-left'
16- | 'landscape-right' ;
17-
18- type keyboardDismissModeType = 'none' | 'on-drag' | 'interactive' ;
1+ import * as React from 'react' ;
2+ import {
3+ StyleProp ,
4+ ViewStyle ,
5+ TextStyle ,
6+ ScrollViewProps ,
7+ ActivityIndicatorProps ,
8+ ModalProps ,
9+ TouchableNativeFeedbackProps ,
10+ TouchableOpacityProps ,
11+ } from 'react-native' ;
1912
20- type keyboardShouldPersistTapsType =
21- | 'always'
22- | 'never'
23- | 'handled'
24- | false
25- | true ;
13+ declare module 'react-native-simple-dialogs' {
2614
2715 type activityIndicatorSizeType = 'small' | 'large' | number ;
2816
2917 export interface BaseProps {
3018 visible ?: boolean ;
3119 onRequestClose ?: ( ) => void ;
32- animationType ?: animationType ;
20+ animationType ?: ModalProps [ ' animationType' ] ;
3321 onShow ?: ( ) => void ;
3422 onOrientationChange ?: ( ) => void ;
35- supportedOrientations ?: supportedOrientationsType [ ] ;
23+ supportedOrientations ?: ModalProps [ 'supportedOrientations' ] ;
3624 onTouchOutside ?: ( ) => void ;
3725 title ?: string ;
3826 titleStyle ?: StyleProp < TextStyle > ;
@@ -41,9 +29,9 @@ declare module 'react-native-simple-dialogs' {
4129 buttonsStyle ?: StyleProp < ViewStyle > ;
4230 overlayStyle ?: StyleProp < ViewStyle > ;
4331 buttons ?: React . ReactNode | React . ReactNode [ ] | JSX . Element
44- keyboardDismissMode ?: keyboardDismissModeType ;
45- keyboardShouldPersistTaps ?: keyboardShouldPersistTapsType ;
46- contentInsetAdjustmentBehavior ?: 'automatic' | 'scrollableAxes' | 'never' | 'always' ;
32+ keyboardDismissMode ?: ScrollViewProps [ 'keyboardDismissMode' ] ;
33+ keyboardShouldPersistTaps ?: ScrollViewProps [ 'keyboardShouldPersistTaps' ] ;
34+ contentInsetAdjustmentBehavior ?: ScrollViewProps [ 'contentInsetAdjustmentBehavior' ] ;
4735 }
4836
4937 export interface DialogProps extends BaseProps {
@@ -53,9 +41,9 @@ declare module 'react-native-simple-dialogs' {
5341 export interface ProgressDialogProps extends BaseProps {
5442 message : string ;
5543 messageStyle ?: StyleProp < TextStyle > ;
56- activityIndicatorColor ?: string ;
57- activityIndicatorSize ?: activityIndicatorSizeType ;
58- activityIndicatorStyle ?: StyleProp < ViewStyle > ;
44+ activityIndicatorColor ?: ActivityIndicatorProps [ 'color' ] ;
45+ activityIndicatorSize ?: ActivityIndicatorProps [ 'size' ] ;
46+ activityIndicatorStyle ?: ActivityIndicatorProps [ 'style' ] ;
5947 }
6048
6149 export interface ButtonProps {
@@ -75,7 +63,10 @@ declare module 'react-native-simple-dialogs' {
7563 }
7664
7765 export class Dialog extends React . Component < DialogProps > { }
66+
7867 export class ProgressDialog extends React . Component < ProgressDialogProps > { }
68+
7969 export class ConfirmDialog extends React . Component < ConfirmDialogProps > { }
80- export class TouchableEffect extends React . Component < Props > { }
70+
71+ export declare const TouchableEffect : React . FC < TouchableNativeFeedbackProps & TouchableOpacityProps > ;
8172}
0 commit comments