This repository was archived by the owner on Sep 26, 2024. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathtypes.d.ts
More file actions
121 lines (106 loc) · 2.74 KB
/
Copy pathtypes.d.ts
File metadata and controls
121 lines (106 loc) · 2.74 KB
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
121
/**
* Copyright (C) 2021 AzureRain
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { StackScreenProps } from '@react-navigation/stack';
import { Fonts } from 'react-native-paper/lib/typescript/types';
import { MaterialBottomTabScreenProps } from '@react-navigation/material-bottom-tabs';
import {
ImageSourcePropType,
ListRenderItem,
StyleProp,
ViewStyle,
} from 'react-native';
export type DetailItems = {
character: { [key: string]: any };
extLinks: { [key: string]: any };
};
export type MultiColumnCardProps = {
title: string;
name: string;
subtitle: string;
onPress?: () => void;
source: string;
style?: StyleProp<ViewStyle>;
};
export type DiscoverySectionProps = {
requiresUpdate: number;
};
export type DiscoverySubSectionProps = {
subSectionTitle: string;
results: Dict[];
};
export type StackListCardProps = {
id: number;
title: string;
name: string;
subtitle: string;
size: number;
onPress?: () => void;
source: ImageSourcePropType;
};
export type BasicInfoListProps = {
results: Dict[];
columns?: 1 | 2;
renderItem: ListRenderItem<Dict> | null | undefined;
};
export type ListRenderItemProps = {
item: Dict;
};
export type Dict = { [key: string]: any };
export type StackParamList = {
Top: any;
About: any;
Settings: any;
Detail: { basic_info: Dict; uri: string };
WebView: { uri: string };
};
export type StackProps = StackScreenProps<StackParamList, 'Top'>;
export type BottomTabParamList = {
Home: undefined;
Search: undefined;
Bookmark: undefined;
Settings: undefined;
};
export type BottomTabProps = MaterialBottomTabScreenProps<
BottomTabParamList,
'Home'
>;
// Copied from react-native-paper
type Mode = 'adaptive' | 'exact';
// Merged theme type from react-navigation and react-native-paper
export type Theme = {
dark: boolean;
mode?: Mode;
roundness: number;
colors: {
primary: string;
background: string;
card: string;
surface: string;
accent: string;
error: string;
text: string;
border: string;
onSurface: string;
disabled: string;
placeholder: string;
backdrop: string;
notification: string;
};
fonts: Fonts;
animation: {
scale: number;
};
};