forked from cemaden-educacao/WPD-MobileApp
GabrielTrettel
3 years ago
10 changed files with 185 additions and 187 deletions
-
6src/app/components/ImageInput.js
-
1src/app/components/ImageInputList.js
-
36src/app/components/PickEventDateLocation.js
-
5src/app/components/TextInput.js
-
16src/app/components/forms/FormDatePicker.js
-
102src/app/components/forms/FormLocationPicker.js
-
54src/app/screens/PluviometerSharingDataScreen.js
-
43src/app/screens/RainSharingDataScreen.js
-
90src/app/screens/RiverFloodSharingDataScreen.js
-
19src/app/screens/SharingFloodZonesScreen.js
@ -1,69 +1,65 @@ |
|||
import React, { useContext } from "react"; |
|||
import { StyleSheet, Text, View, PixelRatio } from "react-native"; |
|||
import { StyleSheet, Text, View } from "react-native"; |
|||
|
|||
import { MaterialIcons } from "@expo/vector-icons"; |
|||
import colors from "../../config/colors"; |
|||
import EventLocationInput from "../EventLocationInput"; |
|||
import { dimensions } from "../../config/dimensions"; |
|||
import { EventLocationContext } from "../../context/EventLocationContext"; |
|||
|
|||
function FormLocationPicker({ subtitle }) { |
|||
const context = useContext(EventLocationContext); |
|||
const local = context.eventLocation.toString(); |
|||
const context = useContext(EventLocationContext); |
|||
const local = context.eventLocation.toString(); |
|||
|
|||
return ( |
|||
<View style={{ marginTop: 10, width: "100%" }}> |
|||
<View style={styles.location}> |
|||
<View style={styles.mapIcon}> |
|||
<MaterialIcons |
|||
name="location-on" |
|||
size={28} |
|||
color="white" |
|||
alignItems="center" |
|||
alignContent="center" |
|||
/> |
|||
</View> |
|||
<View style={styles.adressText}> |
|||
<Text style={{ |
|||
fontSize: dimensions.text.default, |
|||
}}> |
|||
{local} |
|||
</Text> |
|||
<View> |
|||
<Text style={{ color: colors.primary, height: 50 }}> |
|||
{(subtitle ? subtitle : "Defina o local no mapa" )} |
|||
</Text> |
|||
</View> |
|||
</View> |
|||
</View> |
|||
return ( |
|||
<View style={styles.location}> |
|||
|
|||
<View style={styles.mapIcon}> |
|||
<MaterialIcons |
|||
name="location-on" |
|||
size={20} |
|||
color="white" |
|||
/> |
|||
</View> |
|||
|
|||
<View style={styles.adressText}> |
|||
<Text |
|||
style={{ |
|||
fontSize: dimensions.text.default, |
|||
}} |
|||
> |
|||
{local} |
|||
</Text> |
|||
<Text style={{ color: colors.primary}}> |
|||
{subtitle ? subtitle : "Defina o local no mapa"} |
|||
</Text> |
|||
</View> |
|||
); |
|||
|
|||
</View> |
|||
); |
|||
} |
|||
|
|||
const styles = StyleSheet.create({ |
|||
location: { |
|||
//flex: 1,
|
|||
width: "100%", |
|||
flexDirection: "row", |
|||
alignItems: "flex-start", |
|||
justifyContent: "space-between", |
|||
// backgroundColor: colors.secondary,
|
|||
}, |
|||
adressText: { |
|||
flex: 0.90, |
|||
height: "100%", |
|||
flexDirection: "column", |
|||
justifyContent: "center", |
|||
paddingLeft: 5, |
|||
}, |
|||
mapIcon: { |
|||
backgroundColor: colors.primary, |
|||
padding: 8, |
|||
width: 20, |
|||
alignItems: "center", |
|||
borderRadius: 5, |
|||
flex: 0.10, |
|||
}, |
|||
location: { |
|||
flex: 1, |
|||
width: "100%", |
|||
flexDirection: "row", |
|||
alignContent: "space-around", |
|||
justifyContent: "flex-start", |
|||
}, |
|||
|
|||
adressText: { |
|||
height: "100%", |
|||
paddingLeft: 24, |
|||
}, |
|||
|
|||
mapIcon: { |
|||
backgroundColor: colors.primary, |
|||
width: 40, |
|||
height: 40, |
|||
justifyContent: "center", |
|||
alignItems: "center", |
|||
borderRadius: 5, |
|||
}, |
|||
}); |
|||
|
|||
export default FormLocationPicker; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue