From 6b625b8d1ee05febccac6ff7930b3e637e3d4dfe Mon Sep 17 00:00:00 2001 From: Bart Akeley Date: Sat, 20 Oct 2018 10:15:32 -0500 Subject: [PATCH] switch to react-native Modal component --- js/modals/Modal.js | 40 +++++++++++++++++++++++++++------------- package.json | 1 - yarn.lock | 22 +--------------------- 3 files changed, 28 insertions(+), 35 deletions(-) diff --git a/js/modals/Modal.js b/js/modals/Modal.js index 4b5a743..506632d 100644 --- a/js/modals/Modal.js +++ b/js/modals/Modal.js @@ -1,32 +1,46 @@ // flow import React from 'react'; -import { View, TouchableOpacity, Text, TextInput } from 'react-native'; -import Modal from 'react-native-modal'; +import { View, TouchableOpacity, Text, TextInput, Modal } from 'react-native'; import { pure } from 'recompose'; import theme from '../ui-theme'; import { Icon } from 'react-native-material-ui'; export default pure(({ children, isVisible }) => { return ( - + - {children} + }}> + + {children} + ); }); -export const TextButton = ({ text, onPress, style = {} }: { text: string, onPress: () => void, style: Object }) => { +export const TextButton = ({ + text, + onPress, + style = {}, +}: { + text: string, + onPress: () => void, + style: Object, +}) => { return ( diff --git a/package.json b/package.json index 739e7cd..9d678f5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "react-native-looped-carousel": "^0.1.5", "react-native-maps": "0.15.1", "react-native-material-ui": "^1.7.0", - "react-native-modal": "^2.2.0", "react-native-vector-icons": "^4.0.0", "react-router-native": "~4.1.0", "react-router-native-button": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 98cd4a4..6ca9cc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1836,7 +1836,7 @@ fbjs-scripts@^0.7.0: semver "^5.1.0" through2 "^2.0.0" -fbjs@^0.8.1, fbjs@^0.8.16, fbjs@^0.8.9: +fbjs@^0.8.1, fbjs@^0.8.16: version "0.8.16" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" dependencies: @@ -3644,13 +3644,6 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@15.5.10: - version "15.5.10" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - prop-types@^15.5.10, prop-types@^15.6.1: version "15.6.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" @@ -3738,12 +3731,6 @@ react-deep-force-update@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7" -react-native-animatable@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/react-native-animatable/-/react-native-animatable-1.2.4.tgz#b5fb7657e8f6edadbc26697057a327fb920b3039" - dependencies: - prop-types "^15.5.10" - react-native-auth0@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/react-native-auth0/-/react-native-auth0-1.3.0.tgz#fc12c9f673b538936d57a4d1514faf6aef8953d0" @@ -3801,13 +3788,6 @@ react-native-material-ui@^1.7.0: prop-types "^15.5.10" react-native-material-design-styles "^0.2.6" -react-native-modal@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/react-native-modal/-/react-native-modal-2.5.0.tgz#a24018ac028e84e6eb8294278fa02720d9f7f320" - dependencies: - prop-types "15.5.10" - react-native-animatable "^1.2.3" - react-native-vector-icons@^4.0.0: version "4.6.0" resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz#e4014311ffa6de397d914ffc31b7097a874cc8d5"