diff --git a/src/app/components/ImageInput.js b/src/app/components/ImageInput.js index a0ee4c5..31562e1 100644 --- a/src/app/components/ImageInput.js +++ b/src/app/components/ImageInput.js @@ -241,11 +241,11 @@ const styles = StyleSheet.create({ height: 35, }, addBtnContainer: { - padding: 16, - elevation: 40, - marginVertical: 24, + paddingHorizontal: 16, + paddingTop: 24, width: "100%", }, + addBtn: { justifyContent: "center", flexDirection: "row", diff --git a/src/app/components/ImageInputList.js b/src/app/components/ImageInputList.js index def3cf7..3aaf08e 100644 --- a/src/app/components/ImageInputList.js +++ b/src/app/components/ImageInputList.js @@ -31,6 +31,7 @@ function ImageInputList({ imageUris = [], onRemoveImage, onAddImage }) { const styles = StyleSheet.create({ container: { flexDirection: "row", + paddingHorizontal: 16, }, image: { marginRight: 10, diff --git a/src/app/components/PickEventDateLocation.js b/src/app/components/PickEventDateLocation.js index f528167..ce524b3 100644 --- a/src/app/components/PickEventDateLocation.js +++ b/src/app/components/PickEventDateLocation.js @@ -16,29 +16,27 @@ export default function PickEventDateLocation({ - {/*Data da coleta:*/} - - setDate(value)} - onTimeChange={(value) => setTime(value)} - /> + + setDate(value)} + onTimeChange={(value) => setTime(value)} + /> - {/*Local do evento:*/} - {location && - navigation.navigate("FormMap")}> - - } + {location && ( + navigation.navigate("FormMap")}> + + + )} ); } diff --git a/src/app/components/TextInput.js b/src/app/components/TextInput.js index 2e00ebf..2bfbe65 100644 --- a/src/app/components/TextInput.js +++ b/src/app/components/TextInput.js @@ -8,7 +8,7 @@ import {Shadow} from "react-native-shadow-2"; function AppTextInput({ icon, width = "100%", ...otherProps }) { return ( { setShow(true)}> @@ -206,18 +206,18 @@ const styles = StyleSheet.create({ justifyContent: "center", }, dateInput: { - flex: 0.9, + paddingLeft: 16, height: "100%", flexDirection: "column", justifyContent: "center", }, dateIcon: { backgroundColor: colors.primary, - padding: 8, - width: 20, + width: 40, + height: 40, alignItems: "center", + justifyContent: "center", borderRadius: 5, - flex: 0.1, }, }); diff --git a/src/app/components/forms/FormLocationPicker.js b/src/app/components/forms/FormLocationPicker.js index 18d19ed..4094ae3 100644 --- a/src/app/components/forms/FormLocationPicker.js +++ b/src/app/components/forms/FormLocationPicker.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 ( - - - - - - - - {local} - - - - {(subtitle ? subtitle : "Defina o local no mapa" )} - - - - + return ( + + + + + + + + + {local} + + + {subtitle ? subtitle : "Defina o local no mapa"} + - ); + + + ); } 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; diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js index ca0d997..2b7a81f 100644 --- a/src/app/screens/PluviometerSharingDataScreen.js +++ b/src/app/screens/PluviometerSharingDataScreen.js @@ -69,15 +69,16 @@ function PluviometerSharingDataScreen(props) { }} validationSchema={validationSchema} > - - Quantidade de chuva (mm): - - + Quantidade de chuva (mm): + + + - + /> + Comentário: + + + + + - - Comentário: - - - - @@ -131,6 +124,7 @@ const styles = StyleSheet.create({ }, labelStyle: { paddingHorizontal: 16, + paddingBottom: 12, fontSize: dimensions.text.secondary, fontWeight: "bold", textAlign: "left", diff --git a/src/app/screens/RainSharingDataScreen.js b/src/app/screens/RainSharingDataScreen.js index 0452567..f2132be 100644 --- a/src/app/screens/RainSharingDataScreen.js +++ b/src/app/screens/RainSharingDataScreen.js @@ -72,11 +72,12 @@ function RainSharingDataScreen(props) { - + setRain(0)}> - + {rain == 0 ? ( ) : ( @@ -86,17 +87,17 @@ function RainSharingDataScreen(props) { setRain(1)}> - {rain == 1 ? ( ) : ( )} - + + setRain(2)}> - + {rain == 2 ? ( ) : ( @@ -104,27 +105,13 @@ function RainSharingDataScreen(props) { )} - - setRain(3)}> - {rain == 3 ? ( ) : ( )} - - - - setRain(4)}> - - {rain == 4 ? ( - - ) : ( - - )} - @@ -151,7 +138,9 @@ function RainSharingDataScreen(props) { placeholder="Escreva um comentário (Opcional)..." /> - + + + @@ -163,12 +152,12 @@ const styles = StyleSheet.create({ backgroundColor: colors.white, }, img_block: { - flex: 1, - borderRadius: 5, - borderStyle: "dotted", - borderColor: colors.white, - borderWidth: borderWidth, - alignItems: "center", + // flex: 1, + // borderRadius: 5, + // borderStyle: "dotted", + // borderColor: colors.white, + // borderWidth: borderWidth, + // alignItems: "center", }, imgs_row: { flexDirection: "row", @@ -180,6 +169,8 @@ const styles = StyleSheet.create({ }, labelStyle: { paddingHorizontal: 16, + paddingTop: 24, + paddingBottom: 12, fontSize: dimensions.text.secondary, fontWeight: "bold", textAlign: "left", diff --git a/src/app/screens/RiverFloodSharingDataScreen.js b/src/app/screens/RiverFloodSharingDataScreen.js index 11d2f77..48711f6 100644 --- a/src/app/screens/RiverFloodSharingDataScreen.js +++ b/src/app/screens/RiverFloodSharingDataScreen.js @@ -48,7 +48,7 @@ function RiverFloodSharingDataScreen(props) { const [date, setDate] = useState(moment()); const [time, setTime] = useState(moment()); - const dims = scaleDimsFromWidth(80, 80, 20); + const dims = { width: 105, height: 105 }; //scaleDimsFromWidth(80, 80, 26); return ( @@ -66,7 +66,14 @@ function RiverFloodSharingDataScreen(props) { setError(true); return; } - insertRiverData({ ...values, riverScale, location, date, time, address }); + insertRiverData({ + ...values, + riverScale, + location, + date, + time, + address, + }); showMessage({ message: "Informação enviada!", duration: 1950, @@ -77,30 +84,42 @@ function RiverFloodSharingDataScreen(props) { }} validationSchema={validationSchema} > - - - setRiverScale(0)}> - - {riverScale == 0 ? ( - - ) : ( - - )} - - - - setRiverScale(1)}> - + + + + setRiverScale(0)}> + + {riverScale == 0 ? ( + + ) : ( + + )} + + + + setRiverScale(1)}> {riverScale == 1 ? ( ) : ( )} - - + + + + setRiverScale(2)}> - + {riverScale == 2 ? ( ) : ( @@ -110,13 +129,11 @@ function RiverFloodSharingDataScreen(props) { setRiverScale(3)}> - - {riverScale == 3 ? ( - - ) : ( - - )} - + {riverScale == 3 ? ( + + ) : ( + + )} @@ -126,13 +143,15 @@ function RiverFloodSharingDataScreen(props) { )} + + navigation={props.navigation} + /> - Comentário: + + + + - @@ -152,13 +173,6 @@ const styles = StyleSheet.create({ container: { backgroundColor: colors.white, }, - img_block: { - borderRadius: 5, - borderStyle: "dotted", - borderColor: colors.white, - borderWidth: borderWidth, - alignItems: "center", - }, imgs_row: { flexDirection: "row", justifyContent: "space-between", @@ -166,9 +180,11 @@ const styles = StyleSheet.create({ error_txt: { fontSize: 18, color: colors.danger, - }, + }, labelStyle: { paddingHorizontal: 16, + paddingTop: 24, + paddingBottom: 12, fontSize: dimensions.text.secondary, fontWeight: "bold", textAlign: "left", diff --git a/src/app/screens/SharingFloodZonesScreen.js b/src/app/screens/SharingFloodZonesScreen.js index c9e99f4..c39f0d6 100644 --- a/src/app/screens/SharingFloodZonesScreen.js +++ b/src/app/screens/SharingFloodZonesScreen.js @@ -82,7 +82,7 @@ function SharingFloodZonesScreen(props) { > setPassable(1)}> - + {passable == 1 ? ( setPassable(0)}> - {passable == 0 ? ( )} - @@ -123,7 +121,8 @@ function SharingFloodZonesScreen(props) { + navigation={props.navigation} + /> Comentário: - + + + + @@ -144,7 +146,6 @@ const dims = scaleDimsFromWidth(93, 106, 30.0); const styles = StyleSheet.create({ container: { - // padding: 17, backgroundColor: colors.white, }, @@ -161,10 +162,10 @@ const styles = StyleSheet.create({ alignItems: "center", }, imgs_container: { + paddingTop: 16, flexDirection: "row", - justifyContent: "space-evenly", + justifyContent: "center", }, - text: { paddingTop: 5, fontSize: dimensions.text.default, @@ -178,6 +179,8 @@ const styles = StyleSheet.create({ fontSize: dimensions.text.secondary, fontWeight: "bold", paddingHorizontal: 16, + paddingTop: 24, + paddingBottom: 12, textAlign: "left", color: colors.lightBlue, },