-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppContext.tsx
120 lines (118 loc) · 3.82 KB
/
AppContext.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import { createContext } from "react";
type contextProps = {
data: Note[],
binVNData: VoiceNoteType[],
voiceNotes: VoiceNoteType[],
groupList: string[],
binData: Note[],
appTheme: string,
accentColor: string,
noteTemplate: number,
noteHeight: string,
coloredNote: boolean,
titleFontSize: number,
contentFontSize: number,
showNoteBorder: boolean,
showNoteStar: boolean,
showNoteDate: boolean,
showNoteActionBtns: boolean,
titleFontFamily: string,
contentFontFamily: string,
titleBold: boolean,
contentBold: boolean,
isCompact: boolean,
sortOrder: number,
activeScreen: string,
shallBinDelete: boolean,
binDeletionTime: number,
binDeletionTimeUnit: string,
askBeforeDeleting: boolean,
setData: (value: Note[] | VoiceNoteType[]) => void,
setVoiceNotes: (value: VoiceNoteType[]) => void,
setBinData: (value: Note[]) => void,
setBinVNData: (value: VoiceNoteType[]) => void,
setGroupList: (value: string[]) => void,
setIsCompact: (value: boolean) => void,
setAppTheme: (value: string) => void,
setAccentColor: (value: string) => void,
setNoteTemplate: (value: number) => void,
setNoteHeight: (value: string) => void,
setTitleFontSize: (value: number) => void,
setContentFontSize: (value: number) => void,
setTitleFontFamily: (value: string) => void,
setContentFontFamily: (value: string) => void,
setTitleBold: (value: boolean) => void,
setContentBold: (value: boolean) => void,
setColoredNote: (value: boolean) => void,
setShowNoteBorder: (value: boolean) => void,
setShowNoteStar: (value: boolean) => void,
setShowNoteDate: (value: boolean) => void,
setShowNoteActionBtns: (value: boolean) => void,
setSortOrder: (value: number) => void,
setActiveScreen: (value: string) => void,
setShallBinDelete: (value: boolean) => void,
UpdateThemeTo: (value: string) => void,
setBinDeletionTime: (value: number) => void,
setBinDeletionTimeUnit: (value: string) => void,
setAskBeforeDeleting: (value: boolean) => void,
}
export const AppContext = createContext<contextProps>({
titleFontSize: 120,
contentFontSize: 80,
data: [],
voiceNotes: [],
binVNData: [],
binData: [],
groupList: [],
appTheme: 'system',
accentColor: '#9C4237',
noteTemplate: 1,
noteHeight: 'medium',
isCompact: false,
coloredNote: true,
showNoteBorder: false,
showNoteStar: true,
showNoteDate: true,
showNoteActionBtns: true,
titleFontFamily: "Manrope",
contentFontFamily: "Manrope",
titleBold: true,
contentBold: false,
sortOrder: 1,
activeScreen: 'All Notes',
shallBinDelete: true,
binDeletionTime: 3,
binDeletionTimeUnit: 'Months',
askBeforeDeleting: true,
setData: () => { },
setVoiceNotes: () => { },
setBinData: () => { },
setBinVNData: () => { },
setGroupList: () => { },
setIsCompact: () => { },
setAppTheme: () => { },
setAccentColor: () => { },
setNoteTemplate: () => { },
setNoteHeight: () => { },
setTitleFontSize: () => { },
setContentFontSize: () => { },
setTitleFontFamily: () => { },
setContentFontFamily: () => { },
setTitleBold: () => { },
setContentBold: () => { },
setColoredNote: () => { },
setShowNoteBorder: () => { },
setShowNoteStar: () => { },
setShowNoteDate: () => { },
setShowNoteActionBtns: () => { },
setSortOrder: () => { },
setActiveScreen: () => { },
setShallBinDelete: () => { },
UpdateThemeTo: () => { },
setBinDeletionTime: () => { },
setBinDeletionTimeUnit: () => { },
setAskBeforeDeleting: () => { },
});
export const AppContext2 = createContext([{}, () => { }]);
export const AppContext3 = createContext([{}, () => { }]);
export const NavContext = createContext([{}, () => { }]);