mirror of
https://github.com/urosran/cally.git
synced 2025-07-15 09:45:20 +00:00
65 lines
1.5 KiB
TypeScript
65 lines
1.5 KiB
TypeScript
import { StyleSheet } from "react-native";
|
|
import React, { useState } from "react";
|
|
import { Button, ButtonSize, Text, View } from "react-native-ui-lib";
|
|
import { AntDesign } from "@expo/vector-icons";
|
|
import LinearGradient from "react-native-linear-gradient";
|
|
import AddChoreDialog from "./AddChoreDialog";
|
|
|
|
const AddChore = () => {
|
|
|
|
const [isVisible, setIsVisible] = useState<boolean>(false);
|
|
|
|
return (
|
|
<LinearGradient
|
|
colors={["transparent", "#f9f8f7"]}
|
|
locations={[0, 0.5]}
|
|
style={styles.gradient}
|
|
>
|
|
<View style={styles.buttonContainer}>
|
|
<Button
|
|
marginH-25
|
|
size={ButtonSize.large}
|
|
style={styles.button}
|
|
onPress={() => setIsVisible(!isVisible)}
|
|
>
|
|
<AntDesign name="plus" size={24} color="white" />
|
|
<Text white text60R marginL-10>
|
|
Add To Do
|
|
</Text>
|
|
</Button>
|
|
</View>
|
|
<AddChoreDialog isVisible={isVisible} setIsVisible={setIsVisible} />
|
|
</LinearGradient>
|
|
);
|
|
};
|
|
|
|
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,
|
|
},
|
|
});
|