React Native Module to present popovers for iPad
npm install react-native-popover-managerThis is just a fork of the Modal Component in the React Native Project.
Please refer to that for more documentation.
Modified files are:
RCTModalHostView.h, RCTModalHostView.m (now PopoverView),
RCTModalHostViewManager.h, RCTModalHostViewManager.m (now PopoverManager)
and Modal.js (now popovermanager.js)
shell
npm install --save react-native-popover-manager
react-native link react-native-popover-manager
`Example
`js
import React, { Component } from 'react';
import {
View
} from 'react-native';
var Popover = require('react-native-popover-manager');
export default class PopoverExample extends Component {
constructor(props) {
super(props);
this.state = {
popoverVisible:true
};
}
render() {
return (
originX={384}
originY={512}
originW={1}
originH={1}
popoverW={384}
popoverH={384}
onShow={() => {
this.setState({
popoverVisible: true
});
}}
onClose={() => {
this.setState({
popoverVisible: false
});
}}
visible={this.state.popoverVisible}>
);
}
}
``