mirror of
https://github.com/urosran/cally.git
synced 2025-11-27 00:44:54 +00:00
ui changes
This commit is contained in:
@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react";
|
||||
import { Dialog } from "react-native-ui-lib";
|
||||
import { PanningDirectionsEnum } from "react-native-ui-lib/src/incubator/panView";
|
||||
import CloseXIcon from "@/assets/svgs/CloseXIcon";
|
||||
import { StyleSheet } from "react-native";
|
||||
import { Dimensions, StyleSheet } from "react-native";
|
||||
import DropModalIcon from "@/assets/svgs/DropModalIcon";
|
||||
import MenuIcon from "@/assets/svgs/MenuIcon";
|
||||
import { useBrainDumpContext } from "@/contexts/DumpContext";
|
||||
@ -17,9 +17,10 @@ const AddBrainDump = ({
|
||||
}: {
|
||||
addBrainDumpProps: IAddBrainDumpProps;
|
||||
}) => {
|
||||
const {addBrainDump} = useBrainDumpContext();
|
||||
const { addBrainDump } = useBrainDumpContext();
|
||||
const [dumpTitle, setDumpTitle] = useState<string>("");
|
||||
const [dumpDesc, setDumpDesc] = useState<string>("");
|
||||
const { width, height } = Dimensions.get("screen");
|
||||
|
||||
useEffect(() => {
|
||||
setDumpDesc("");
|
||||
@ -30,13 +31,13 @@ const AddBrainDump = ({
|
||||
<Dialog
|
||||
bottom={true}
|
||||
height={"90%"}
|
||||
width={width}
|
||||
panDirection={PanningDirectionsEnum.DOWN}
|
||||
onDismiss={() => addBrainDumpProps.setIsVisible(false)}
|
||||
containerStyle={{
|
||||
borderRadius: 10,
|
||||
borderTopRightRadius: 15,
|
||||
borderTopLeftRadius: 15,
|
||||
backgroundColor: "white",
|
||||
width: "100%",
|
||||
alignSelf: "stretch",
|
||||
padding: 0,
|
||||
paddingTop: 3,
|
||||
margin: 0,
|
||||
@ -52,13 +53,16 @@ const AddBrainDump = ({
|
||||
addBrainDumpProps.setIsVisible(false);
|
||||
}}
|
||||
/>
|
||||
<DropModalIcon style={{ marginTop: 15 }} onPress={() => addBrainDumpProps.setIsVisible(false)}/>
|
||||
<DropModalIcon
|
||||
style={{ marginTop: 15 }}
|
||||
onPress={() => addBrainDumpProps.setIsVisible(false)}
|
||||
/>
|
||||
<Button
|
||||
color="#05a8b6"
|
||||
label="Save"
|
||||
style={styles.topBtn}
|
||||
onPress={() => {
|
||||
addBrainDump({id: 99, title: dumpTitle, description: dumpDesc})
|
||||
addBrainDump({ id: 99, title: dumpTitle, description: dumpDesc });
|
||||
addBrainDumpProps.setIsVisible(false);
|
||||
}}
|
||||
/>
|
||||
@ -72,7 +76,7 @@ const AddBrainDump = ({
|
||||
setDumpTitle(text);
|
||||
}}
|
||||
/>
|
||||
<View height={2} backgroundColor="#b3b3b3" width={"100%"} marginB-20/>
|
||||
<View height={2} backgroundColor="#b3b3b3" width={"100%"} marginB-20 />
|
||||
<TextField
|
||||
value={dumpDesc}
|
||||
placeholder="Write Description"
|
||||
|
||||
Reference in New Issue
Block a user