import { StyleSheet } from "react-native"; import React, { useEffect, useState } from "react"; import { Button, ButtonSize, View, Text, ActionSheet, TextField, Dialog, Slider, NumberInput, NumberInputData, DateTimePicker, Switch, Picker, } from "react-native-ui-lib"; import { AntDesign, Feather, Ionicons } from "@expo/vector-icons"; import LinearGradient from "react-native-linear-gradient"; import { PanningDirectionsEnum } from "react-native-ui-lib/src/components/panningViews/panningProvider"; import { repeatOptions, useToDosContext } from "@/contexts/ToDosContext"; import { setDate } from "date-fns"; import PointsSlider from "@/components/shared/PointsSlider"; const AddChore = () => { const { addToDo, toDos } = useToDosContext(); const [isVisible, setIsVisible] = useState(false); const [newTitle, setNewTitle] = useState(""); const [points, setPoints] = useState(10); const [choreDate, setChoreDate] = useState(new Date()); const [rotate, setRotate] = useState(false); const [repeatType, setRepeatType] = useState("Every week"); const handleChange = (text: string) => { const numericValue = parseInt(text, 10); if (!isNaN(numericValue) && numericValue >= 0 && numericValue <= 100) { setPoints(numericValue); } else if (text === "") { setPoints(0); } }; return ( setIsVisible(false)} containerStyle={{ borderRadius: 10, backgroundColor: "white", width: "100%", alignSelf: "stretch", padding: 0, paddingTop: 3, margin: 0, }} visible={isVisible} > ); }; export default AddChore; const styles = StyleSheet.create({ divider: { height: 1, backgroundColor: "#e4e4e4", marginVertical: 15 }, gradient: { height: "25%", position: "absolute", bottom: 0, width: "100%", }, buttonContainer: { position: "absolute", bottom: 25, width: "100%", }, button: { backgroundColor: "rgb(253, 23, 117)", paddingVertical: 20, }, topBtn: { backgroundColor: "white", color: "#05a8b6", }, rotateSwitch: { marginLeft: 35, marginBottom: 10, marginTop: 25, }, });