11declare module 'react-native-simple-dialogs' {
22 import * as React from 'react' ;
33 import {
4- View ,
5- ViewProps ,
6- Text ,
7- Button ,
84 StyleProp ,
9- ButtonProps ,
5+ ViewStyle ,
6+ TextStyle ,
107 } from 'react-native' ;
118
129 type animationType = 'none' | 'slide' | 'fade' ;
1310
1411 type supportedOrientationsType =
15- | 'portrait'
16- | 'portrait-upside-down'
17- | 'landscape'
18- | 'landscape-left'
19- | 'landscape-right' ;
12+ | 'portrait'
13+ | 'portrait-upside-down'
14+ | 'landscape'
15+ | 'landscape-left'
16+ | 'landscape-right' ;
2017
2118 type keyboardDismissModeType = 'none' | 'on-drag' | 'interactive' ;
2219
2320 type keyboardShouldPersistTapsType =
24- | 'always'
25- | 'never'
26- | 'handled'
27- | false
28- | true ;
21+ | 'always'
22+ | 'never'
23+ | 'handled'
24+ | false
25+ | true ;
2926
3027 type activityIndicatorSizeType = 'small' | 'large' ;
3128
@@ -38,33 +35,43 @@ declare module 'react-native-simple-dialogs' {
3835 supportedOrientations ?: supportedOrientationsType ;
3936 onTouchOutside ?: ( ) => void ;
4037 title ?: string ;
41- titleStyle ?: StyleProp < Text > ;
42- dialogStyle ?: StyleProp < View > ;
43- contentStyle ?: ViewProps < View > ;
44- buttonsStyle ?: StyleProp < View > ;
45- overlayStyle ?: StyleProp < View > ;
46- buttons ?: ButtonProps < Button > ;
38+ titleStyle ?: StyleProp < TextStyle > ;
39+ dialogStyle ?: StyleProp < ViewStyle > ;
40+ contentStyle ?: StyleProp < ViewStyle > ;
41+ buttonsStyle ?: StyleProp < ViewStyle > ;
42+ overlayStyle ?: StyleProp < ViewStyle > ;
43+ buttons ?: React . ComponentType < any > ;
4744 keyboardDismissMode ?: keyboardDismissModeType ;
4845 keyboardShouldPersistTaps ?: keyboardShouldPersistTapsType ;
46+ children : React . ComponentType < any > ;
4947 }
5048
5149 export interface ProgressDialogProps extends DialogProps {
5250 message : string ;
53- messageStyle ?: StyleProp < Text > ;
51+ messageStyle ?: StyleProp < TextStyle > ;
5452 activityIndicatorColor ?: string ;
5553 activityIndicatorSize ?: activityIndicatorSizeType ;
56- activityIndicatorStyle ?: StyleProp < View > ;
54+ activityIndicatorStyle ?: StyleProp < ViewStyle > ;
55+ }
56+
57+ export interface ButtonProps {
58+ title : string ;
59+ onPress : ( ) => void ;
60+ disabled ?: boolean ;
61+ titleStyle ?: StyleProp < TextStyle > ;
62+ style ?: StyleProp < ViewStyle > ;
5763 }
5864
5965 export interface ConfirmDialogProps extends DialogProps {
6066 message ?: string ;
61- messageStyle ?: StyleProp < Text > ;
62- negativeButton ?: ButtonProps < Button > ;
63- positiveButton : ButtonProps < Button > ;
67+ messageStyle ?: StyleProp < TextStyle > ;
68+ negativeButton ?: ButtonProps ;
69+ positiveButton : ButtonProps ;
70+ children ?: React . ComponentType < any > ;
6471 }
6572
66- export class Dialog extends React . Component < DialogProps > { }
67- export class ProgressDialog extends React . Component < ProgressDialogProps > { }
68- export class ConfirmDialog extends React . Component < ConfirmDialogProps > { }
69- export class TouchableEffect extends React . Component < Props > { }
73+ export class Dialog extends React . Component < DialogProps > { }
74+ export class ProgressDialog extends React . Component < ProgressDialogProps > { }
75+ export class ConfirmDialog extends React . Component < ConfirmDialogProps > { }
76+ export class TouchableEffect extends React . Component < Props > { }
7077}
0 commit comments