mirror of
https://github.com/urosran/cally.git
synced 2025-11-27 17:04:55 +00:00
changes to calendar and UI
This commit is contained in:
@ -3,8 +3,10 @@ import React, { useState } from "react";
|
||||
import { MaterialIcons } from "@expo/vector-icons";
|
||||
import { StyleSheet } from "react-native";
|
||||
|
||||
const CalendarViewSwitch = () => {
|
||||
const [show, setShow] = useState<boolean>(false);
|
||||
interface ICalendarViewProps {
|
||||
viewSwitch: (value: boolean) => void;
|
||||
}
|
||||
const CalendarViewSwitch = (calendarViewProps: ICalendarViewProps) => {
|
||||
const [calView, setCalView] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
@ -29,7 +31,12 @@ const CalendarViewSwitch = () => {
|
||||
}}
|
||||
centerV
|
||||
>
|
||||
<TouchableOpacity onPress={() => setCalView(true)}>
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
setCalView(true);
|
||||
calendarViewProps.viewSwitch(true);
|
||||
}}
|
||||
>
|
||||
<View
|
||||
centerV
|
||||
centerH
|
||||
@ -43,7 +50,12 @@ const CalendarViewSwitch = () => {
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity onPress={() => setCalView(false)}>
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
setCalView(false);
|
||||
calendarViewProps.viewSwitch(false);
|
||||
}}
|
||||
>
|
||||
<View
|
||||
centerV
|
||||
centerH
|
||||
|
||||
Reference in New Issue
Block a user