mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #32833 from PaitoAnderson/master
Update react-native-popup-dialog
This commit is contained in:
+3
-5
@@ -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" />}
|
||||
|
||||
Reference in New Issue
Block a user