import React, { useState } from "react"; import { Button, StyleSheet, View } from "react-native"; import * as Yup from "yup"; import { Form, FormField, FormPicker as Picker, SubmitButton, } from "../components/forms"; import CategoryPickerItem from "../components/CategoryPickerItem"; import Screen from "../components/Screen"; import FormImagePicker from "../components/forms/FormImagePicker"; import useLocation from "../hooks/useLocation"; import { Image, Text, TouchableOpacity } from 'react-native'; import colors from "../config/colors"; import { TouchableNativeFeedback } from "react-native-gesture-handler"; //1/3 const styles = StyleSheet.create({ container: { paddingTop: 50, }, img_block: { height: 120, padding: 10, borderRadius: 5, borderStyle: "dotted", borderColor: colors.primary, justifyContent: "center", alignItems: "center", }, floodingLogo: { width: 85, height: 85, marginTop: 30, borderRadius: 5, borderColor: colors.primary, justifyContent: "center", alignItems: "center", }, }) const validationSchema = Yup.object().shape({ images: Yup.array().min(1, "Por favor, selecione ao menos uma imagem"), description: Yup.string() .label("Description") .required("Por favor, forneça uma descrição"), }); function RainSharingDataScreen() { const [passable, setPassable] = useState(0); return (
submitForm({ ...values, passable, location })} validationSchema={validationSchema} > Enviar uma informação setPassable(0)}> Sem chuva setPassable(1)}> Chuva fraca setPassable(2)}> Chuva{"\n"}moderada setPassable(3)}> Chuva forte setPassable(4)}> Chuva muito{"\n"}forte setPassable(5)}> Pancada de{"\n"}chuva