summaryrefslogtreecommitdiff
path: root/client/src/lib/components/modal.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-05 19:36:33 -0400
committerJules Laplace <julescarbon@gmail.com>2017-06-05 19:36:33 -0400
commit683b98df6daa0333cdcf3c2d7c2b7a45f74b61c4 (patch)
tree866f18bc001e19e70503239205056c8fabc7add1 /client/src/lib/components/modal.js
parent0db4fb0e088b55786928a994d70f1c1c6040e4ab (diff)
fixing obnoxious scroll bug
Diffstat (limited to 'client/src/lib/components/modal.js')
-rw-r--r--client/src/lib/components/modal.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/client/src/lib/components/modal.js b/client/src/lib/components/modal.js
index 38869ce..e6766e1 100644
--- a/client/src/lib/components/modal.js
+++ b/client/src/lib/components/modal.js
@@ -4,15 +4,19 @@ import {
View,
} from 'react-native';
+import browser from './browser'
+
export default class Modal extends Component {
render() {
let style = [ styles.modal ]
+ let className = 'modal'
if (this.props.isVisible) {
style.push(styles.visible)
+ className += ' visible'
}
style.push( this.props.style )
return (
- <View style={style} className='modal'>
+ <View style={style} className={className}>
{this.props.children}
</View>
)
@@ -22,10 +26,11 @@ export default class Modal extends Component {
const styles = StyleSheet.create({
modal: {
position: 'fixed',
- top: '100%',
+ top: 0,
left: 0,
- width: '100%',
- height: '100%',
+ width: '100vw',
+ height: '100vh',
+ overflow: 'hidden',
zIndex: 2,
backgroundColor: 'black',
flex: 1,
@@ -35,7 +40,6 @@ const styles = StyleSheet.create({
opacity: 0,
},
visible: {
- top: '0%',
opacity: 1,
},
})