Fix or suppress errors in react-native

Reviewed By: jeffmo

Differential Revision: D3209973

fb-gh-sync-id: bdc9b4afc0b187b1b16fa6bfb1c34adb4089ab81
fbshipit-source-id: bdc9b4afc0b187b1b16fa6bfb1c34adb4089ab81
This commit is contained in:
glevi@fb.com
2016-04-21 19:46:36 -07:00
committed by Facebook Github Bot 0
parent 5a93877673
commit 91d4a093ea
13 changed files with 86 additions and 70 deletions

View File

@@ -34,6 +34,18 @@ const RCTModalHostView = requireNativeComponent('RCTModalHostView', null);
* configureScene property.
*/
class Modal extends React.Component {
static propTypes = {
animated: PropTypes.bool,
transparent: PropTypes.bool,
visible: PropTypes.bool,
onRequestClose: Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func,
onShow: PropTypes.func,
};
static defaultProps = {
visible: true,
};
render(): ?ReactElement {
if (this.props.visible === false) {
return null;
@@ -65,18 +77,6 @@ class Modal extends React.Component {
}
}
Modal.propTypes = {
animated: PropTypes.bool,
transparent: PropTypes.bool,
visible: PropTypes.bool,
onRequestClose: Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func,
onShow: PropTypes.func,
};
Modal.defaultProps = {
visible: true,
};
const styles = StyleSheet.create({
modal: {
position: 'absolute',