mirror of
https://github.com/urosran/cally.git
synced 2025-08-26 06:09:40 +00:00
changes to reminders modal
This commit is contained in:
@ -7,7 +7,6 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
Button,
|
Button,
|
||||||
View,
|
View,
|
||||||
Checkbox,
|
|
||||||
Switch,
|
Switch,
|
||||||
Picker,
|
Picker,
|
||||||
} from "react-native-ui-lib";
|
} from "react-native-ui-lib";
|
||||||
@ -34,10 +33,7 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
const [reminderTitle, setReminderTitle] = useState<string>("");
|
const [reminderTitle, setReminderTitle] = useState<string>("");
|
||||||
const [time, setTime] = useState(new Date());
|
const [time, setTime] = useState(new Date());
|
||||||
const [autoRepeat, setAutoRepeat] = useState<boolean>(false);
|
const [autoRepeat, setAutoRepeat] = useState<boolean>(false);
|
||||||
const [reminder, setReminder] = useState<reminderOptions | undefined>({
|
const [reminder, setReminder] = useState<string>("just-in-time");
|
||||||
label: "Remind me just in time",
|
|
||||||
value: "just-in-time",
|
|
||||||
});
|
|
||||||
|
|
||||||
const reminderOptions = [
|
const reminderOptions = [
|
||||||
{ label: "Remind me just in time", value: "just-in-time" },
|
{ label: "Remind me just in time", value: "just-in-time" },
|
||||||
@ -59,7 +55,6 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
onDismiss={onClose}
|
onDismiss={onClose}
|
||||||
panDirection={PanningProvider.Directions.RIGHT}
|
panDirection={PanningProvider.Directions.RIGHT}
|
||||||
containerStyle={{ borderRadius: 12, backgroundColor: "white" }}
|
containerStyle={{ borderRadius: 12, backgroundColor: "white" }}
|
||||||
height="70%"
|
|
||||||
>
|
>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Text style={styles.title}>New Reminder</Text>
|
<Text style={styles.title}>New Reminder</Text>
|
||||||
@ -78,7 +73,7 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
title={"+ Add"}
|
title={"+ Add"}
|
||||||
size={Button.sizes.xSmall}
|
size={Button.sizes.xSmall}
|
||||||
onPress={() => {}}
|
onPress={() => {}}
|
||||||
></ButtonOutlined>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.iconTitle}>
|
<View style={styles.iconTitle}>
|
||||||
<View
|
<View
|
||||||
@ -133,14 +128,11 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
/>
|
/>
|
||||||
<Picker
|
<Picker
|
||||||
text70
|
text70
|
||||||
value={reminder?.value}
|
value={reminder}
|
||||||
onChange={(item: reminderOptions) => {
|
onChange={(item) => setReminder(item)}
|
||||||
setReminder({ label: item.label, value: item.value });
|
|
||||||
}}
|
|
||||||
useDialog
|
useDialog
|
||||||
fieldType="form"
|
fieldType="form"
|
||||||
placeholder="Select a reminder"
|
placeholder="Select a reminder"
|
||||||
items={reminderOptions}
|
|
||||||
trailingAccessory={
|
trailingAccessory={
|
||||||
<Feather
|
<Feather
|
||||||
name="chevron-down"
|
name="chevron-down"
|
||||||
@ -149,7 +141,15 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
color="black"
|
color="black"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
></Picker>
|
>
|
||||||
|
{reminderOptions.map((option) => (
|
||||||
|
<Picker.Item
|
||||||
|
key={option.value}
|
||||||
|
label={option.label}
|
||||||
|
value={option.value}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Picker>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.divider} />
|
<View style={styles.divider} />
|
||||||
@ -171,14 +171,27 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.divider} />
|
<View style={styles.inner} marginT-10>
|
||||||
<View style={styles.inner}>
|
<View
|
||||||
<View flex row>
|
style={{
|
||||||
<ButtonOutlined
|
display: "flex",
|
||||||
title={"+ Add"}
|
flexDirection: "row",
|
||||||
size={Button.sizes.medium}
|
justifyContent: "space-between",
|
||||||
onPress={() => {}}
|
width: "100%",
|
||||||
></ButtonOutlined>
|
}}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
label="Cancel"
|
||||||
|
style={styles.button}
|
||||||
|
color='black'
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
label="Save"
|
||||||
|
borderRadius={5}
|
||||||
|
backgroundColor="#00c87e"
|
||||||
|
style={{width: '49%'}}
|
||||||
|
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -189,9 +202,19 @@ const AddReminderModal = (props: ReminderModalProps) => {
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
paddingVertical: 10,
|
paddingVertical: 10,
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
flexDirection: 'column',
|
flexDirection: "column",
|
||||||
justifyContent: 'space-between'
|
justifyContent: "space-between",
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
backgroundColor: "white",
|
||||||
|
color: "black",
|
||||||
|
borderColor: "lightgray",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 5,
|
||||||
|
padding: 0,
|
||||||
|
marginHorizontal: 0,
|
||||||
|
width:'49%'
|
||||||
},
|
},
|
||||||
inner: {
|
inner: {
|
||||||
paddingHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
|
Reference in New Issue
Block a user