From 7f68109ad68f2c4f68f7dd6461a4ba44249f6123 Mon Sep 17 00:00:00 2001 From: Paito Anderson Date: Wed, 6 Feb 2019 09:28:43 -0500 Subject: [PATCH] Update react-native-popup-dialog --- types/react-native-popup-dialog/index.d.ts | 8 +++--- .../react-native-popup-dialog-tests.tsx | 25 +++++++++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/types/react-native-popup-dialog/index.d.ts b/types/react-native-popup-dialog/index.d.ts index d0a9d22a4b..b81533a6bc 100644 --- a/types/react-native-popup-dialog/index.d.ts +++ b/types/react-native-popup-dialog/index.d.ts @@ -17,7 +17,7 @@ export interface DialogContentProps { style?: StyleProp; } -export interface DialogActionListProps { +export interface DialogFooterProps { bordered?: boolean; style?: StyleProp; } @@ -70,9 +70,7 @@ export interface DialogProps { onDismiss?: () => void; onTouchOutside?: () => void; onHardwareBackPress?: () => boolean; - actions?: any[]; - actionContainerStyle?: StyleProp; - actionsBordered?: boolean; + footer?: any; useNativeDriver?: boolean; } @@ -97,7 +95,7 @@ export class SlideAnimation { } export class DialogContent extends React.Component { } -export class DialogActionList extends React.Component { } +export class DialogFooter extends React.Component { } export class DialogButton extends React.Component { } export class DialogTitle extends React.Component { } export class Overlay extends React.Component { } diff --git a/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx b/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx index 55f979f506..2dc943d35b 100644 --- a/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx +++ b/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx @@ -7,6 +7,7 @@ import Dialog, { SlideAnimation, ScaleAnimation, FadeAnimation, + DialogFooter, } from 'react-native-popup-dialog'; const slideAnimation = new SlideAnimation({ slideFrom: 'bottom' }); @@ -50,14 +51,22 @@ class Test extends React.Component { this.scalingPopupDialog = popupDialog} dialogTitle={} dialogAnimation={scaleAnimation} - actions={[ - this.dismissPopupDialog(this.scalingPopupDialog)} - textStyle={{ color: "red" }} - key="button-1" - />, - ]} + footer={ + + this.dismissPopupDialog(this.scalingPopupDialog)} + textStyle={{ color: "red" }} + bordered + key="button-1" + /> + {}} + key="button-2" + /> + + } /> this.slidingPopupDialog = popupDialog} dialogTitle={}