Merge pull request #32833 from PaitoAnderson/master

Update react-native-popup-dialog
This commit is contained in:
Armando Aguirre
2019-02-06 12:51:10 -08:00
committed by GitHub
2 changed files with 20 additions and 13 deletions
+3 -5
View File
@@ -17,7 +17,7 @@ export interface DialogContentProps {
style?: StyleProp<ViewStyle>;
}
export interface DialogActionListProps {
export interface DialogFooterProps {
bordered?: boolean;
style?: StyleProp<ViewStyle>;
}
@@ -70,9 +70,7 @@ export interface DialogProps {
onDismiss?: () => void;
onTouchOutside?: () => void;
onHardwareBackPress?: () => boolean;
actions?: any[];
actionContainerStyle?: StyleProp<ViewStyle>;
actionsBordered?: boolean;
footer?: any;
useNativeDriver?: boolean;
}
@@ -97,7 +95,7 @@ export class SlideAnimation {
}
export class DialogContent extends React.Component<DialogContentProps, any> { }
export class DialogActionList extends React.Component<DialogActionListProps, any> { }
export class DialogFooter extends React.Component<DialogFooterProps, any> { }
export class DialogButton extends React.Component<DialogButtonProps, any> { }
export class DialogTitle extends React.Component<DialogTitleProps, any> { }
export class Overlay extends React.Component<OverlayProps, any> { }
@@ -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<any> {
<Dialog ref={(popupDialog) => this.scalingPopupDialog = popupDialog}
dialogTitle={<DialogTitle title="Popup Dialog - Scale Animation" />}
dialogAnimation={scaleAnimation}
actions={[
<DialogButton
text="CLOSE"
onPress={(event) => this.dismissPopupDialog(this.scalingPopupDialog)}
textStyle={{ color: "red" }}
key="button-1"
/>,
]}
footer={
<DialogFooter>
<DialogButton
text="CLOSE"
onPress={(event) => this.dismissPopupDialog(this.scalingPopupDialog)}
textStyle={{ color: "red" }}
bordered
key="button-1"
/>
<DialogButton
text="OK"
onPress={() => {}}
key="button-2"
/>
</DialogFooter>
}
/>
<Dialog ref={(popupDialog) => this.slidingPopupDialog = popupDialog}
dialogTitle={<DialogTitle title="Popup Dialog - Slide Animation" />}