'use strict'

import React from 'react'
import {
	View,
	TouchableHighlight,
  Image,
	Text,
  Modal
} from 'react-native';

var css = require('../../styles/css');

// Modal with text information content and a large button (usually for dismissing the modal)
export default class InfoModal extends React.Component {
  _onPress = () => {
    if (this.props.onPress) {
      this.props.onPress(); //callback when modal is pressed
    }
  }
  render() {
    return(
      <Modal animationType={'none'} transparent={true} visible={this.props.modalVisible} onRequestClose={() => {this.props.onRequestClose}}>
        <View style={css.modal_container}>
          <Text style={css.modal_text_intro}>{this.props.title}</Text>
          <Text style={css.modal_text}>
            {this.props.children}
          </Text>

          <TouchableHighlight underlayColor={'rgba(200,200,200,.5)'} onPress={this._onPress}>
            <View style={css.modal_button}>
              <Text style={css.modal_button_text}>{this.props.buttonText}</Text>
            </View>
          </TouchableHighlight>
        </View>
      </Modal>
    );
  }
}

@@ -1,18 +1,4 @@
-'use strict'%0A%0A
 impo
@@ -18,16 +18,17 @@
  'react'
+;
 %0Aimport 
@@ -61,26 +61,16 @@
 ht,%0A
-  Image,%0A
 %09Text,%0A
-  
+%09
 Moda
@@ -99,11 +99,13 @@
 ';%0A%0A
-var
+const
  css
@@ -287,18 +287,17 @@
 onent %7B%0A
-  
+%09
 _onPress
@@ -307,20 +307,18 @@
 () =%3E %7B%0A
-    
+%09%09
 if (this
@@ -335,22 +335,19 @@
 ress) %7B%0A
-      
+%09%09%09
 this.pro
@@ -362,16 +362,17 @@
 ss(); //
+ 
 callback
@@ -398,20 +398,16 @@
 sed%0A
-    %7D%0A  %7D%0A  
+%09%09%7D%0A%09%7D%0A%09
 rend
@@ -417,26 +417,22 @@
 ) %7B%0A
-    
+%09%09
 return
+ 
 (%0A
-      
+%09%09%09
 %3CMod
@@ -532,17 +532,16 @@
 =%7B() =%3E 
-%7B
 this.pro
@@ -558,27 +558,22 @@
 stClose%7D
-%7D
 %3E%0A
-        
+%09%09%09%09
 %3CView st
@@ -599,26 +599,21 @@
 ainer%7D%3E%0A
-          
+%09%09%09%09%09
 %3CText st
@@ -665,26 +665,21 @@
 %3C/Text%3E%0A
-          
+%09%09%09%09%09
 %3CText st
@@ -700,28 +700,22 @@
 _text%7D%3E%0A
-            
+%09%09%09%09%09%09
 %7Bthis.pr
@@ -732,37 +732,27 @@
 en%7D%0A
-          %3C/Text%3E%0A%0A          
+%09%09%09%09%09%3C/Text%3E%0A%0A%09%09%09%09%09
 %3CTou
@@ -831,28 +831,22 @@
 Press%7D%3E%0A
-            
+%09%09%09%09%09%09
 %3CView st
@@ -873,22 +873,15 @@
 n%7D%3E%0A
-              
+%09%09%09%09%09%09%09
 %3CTex
@@ -947,38 +947,27 @@
 xt%3E%0A
-            %3C/View%3E%0A          
+%09%09%09%09%09%09%3C/View%3E%0A%09%09%09%09%09
 %3C/To
@@ -988,24 +988,20 @@
 ht%3E%0A
-        
+%09%09%09%09
 %3C/View%3E%0A
     
@@ -1000,14 +1000,11 @@
 ew%3E%0A
-      
+%09%09%09
 %3C/Mo
@@ -1012,17 +1012,14 @@
 al%3E%0A
-    );%0A  
+%09%09);%0A%09
 %7D%0A%7D%0A

update info modal