|
@ -1,16 +1,18 @@ |
|
|
import React from "react"; |
|
|
|
|
|
|
|
|
import React, { useContext } from "react"; |
|
|
import { StyleSheet, Text, View, PixelRatio } from "react-native"; |
|
|
import { StyleSheet, Text, View, PixelRatio } from "react-native"; |
|
|
|
|
|
|
|
|
import { MaterialIcons } from "@expo/vector-icons"; |
|
|
import { MaterialIcons } from "@expo/vector-icons"; |
|
|
import colors from "../../config/colors"; |
|
|
import colors from "../../config/colors"; |
|
|
import EventLocationInput from "../EventLocationInput"; |
|
|
import EventLocationInput from "../EventLocationInput"; |
|
|
|
|
|
import { dimensions } from "../../config/dimensions"; |
|
|
|
|
|
import { EventLocationContext } from "../../context/EventLocationContext"; |
|
|
|
|
|
|
|
|
function FormLocationPicker() { |
|
|
function FormLocationPicker() { |
|
|
|
|
|
const context = useContext(EventLocationContext); |
|
|
|
|
|
const local = context.eventLocation.toString(); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<View style={{ width:"100%", |
|
|
|
|
|
paddingLeft: (PixelRatio.get() >3 || PixelRatio.getFontScale() > 1.14 ? 0 : 15), |
|
|
|
|
|
marginTop: (PixelRatio.get()>3 || PixelRatio.getFontScale() > 1.14 ? 10 : 0)}}> |
|
|
|
|
|
|
|
|
<View style={{ marginTop: 10, width: "100%" }}> |
|
|
<View style={styles.location}> |
|
|
<View style={styles.location}> |
|
|
<View style={styles.mapIcon}> |
|
|
<View style={styles.mapIcon}> |
|
|
<MaterialIcons |
|
|
<MaterialIcons |
|
@ -22,16 +24,20 @@ function FormLocationPicker() { |
|
|
/> |
|
|
/> |
|
|
</View> |
|
|
</View> |
|
|
<View style={styles.adressText}> |
|
|
<View style={styles.adressText}> |
|
|
<Text> |
|
|
|
|
|
<EventLocationInput /> |
|
|
|
|
|
|
|
|
<Text style={{ |
|
|
|
|
|
fontSize: dimensions.text.default, |
|
|
|
|
|
textAlign: "justify", |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
}}> |
|
|
|
|
|
{local} |
|
|
</Text> |
|
|
</Text> |
|
|
|
|
|
<View> |
|
|
|
|
|
<Text style={{ color: colors.primary, height: 50 }}> |
|
|
|
|
|
Defina o local no mapa |
|
|
|
|
|
</Text> |
|
|
|
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
<View> |
|
|
|
|
|
<Text style={{ color: colors.primary }}> |
|
|
|
|
|
Defina o local no mapa |
|
|
|
|
|
</Text> |
|
|
|
|
|
</View> |
|
|
|
|
|
</View> |
|
|
</View> |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
@ -39,14 +45,14 @@ function FormLocationPicker() { |
|
|
const styles = StyleSheet.create({ |
|
|
const styles = StyleSheet.create({ |
|
|
location: { |
|
|
location: { |
|
|
//flex: 1,
|
|
|
//flex: 1,
|
|
|
width:"100%", |
|
|
|
|
|
|
|
|
width: "100%", |
|
|
flexDirection: "row", |
|
|
flexDirection: "row", |
|
|
alignItems: "flex-start", |
|
|
alignItems: "flex-start", |
|
|
justifyContent: "space-between", |
|
|
justifyContent: "space-between", |
|
|
// backgroundColor: colors.secondary,
|
|
|
|
|
|
|
|
|
// backgroundColor: colors.secondary,
|
|
|
}, |
|
|
}, |
|
|
adressText: { |
|
|
adressText: { |
|
|
flex: 0.80, |
|
|
|
|
|
|
|
|
flex: 0.90, |
|
|
paddingLeft: 5, |
|
|
paddingLeft: 5, |
|
|
}, |
|
|
}, |
|
|
mapIcon: { |
|
|
mapIcon: { |
|
@ -55,7 +61,7 @@ const styles = StyleSheet.create({ |
|
|
width: 20, |
|
|
width: 20, |
|
|
alignItems: "center", |
|
|
alignItems: "center", |
|
|
borderRadius: 5, |
|
|
borderRadius: 5, |
|
|
flex: 0.20, |
|
|
|
|
|
|
|
|
flex: 0.10, |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|