mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:24:56 -06:00
switch to react-native Modal component
This commit is contained in:
parent
85111c38a4
commit
6b625b8d1e
3 changed files with 28 additions and 35 deletions
|
|
@ -1,14 +1,20 @@
|
|||
// 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 (
|
||||
<Modal isVisible={isVisible} backdropColor="black" backdropOpacity={0.7}>
|
||||
<Modal visible={isVisible} transparent={true} animationType="fade">
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: 'rgba(0,0,0,0.7)',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'column',
|
||||
|
|
@ -18,15 +24,23 @@ export default pure(({ children, isVisible }) => {
|
|||
alignItems: 'stretch',
|
||||
borderRadius: 4,
|
||||
flexShrink: 1,
|
||||
}}
|
||||
>
|
||||
}}>
|
||||
{children}
|
||||
</View>
|
||||
</View>
|
||||
</Modal>
|
||||
);
|
||||
});
|
||||
|
||||
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 (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={{ flexShrink: 0, ...style }}>
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
22
yarn.lock
22
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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue