-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathNavTypes.ts
42 lines (38 loc) · 878 Bytes
/
NavTypes.ts
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
import {
HomeScreen,
UsageCustom,
UsageDifferentFontFamilies,
UsageDisabled,
UsageLeft,
UsageWithCustomOverflow,
UsageWithIcons,
UsageWithOverflow,
UsageWithOverflowComplex,
} from './screens';
import type { StackScreenProps } from '@react-navigation/stack';
import { UsageNativeMenu } from './screens/UsageNativeMenu';
export const screens = {
HomeScreen,
UsageWithIcons,
UsageWithOverflowComplex,
UsageLeft,
UsageCustom,
UsageDisabled,
UsageWithOverflow,
UsageDifferentFontFamilies,
UsageWithCustomOverflow,
UsageNativeMenu,
} as const;
export type ScreenNames = keyof typeof screens;
export type RootStackParamList = Omit<
{
[key in keyof typeof screens]: undefined;
},
'UsageLeft'
> & {
UsageLeft: { showIcon: boolean };
};
export type ScreenProps<S extends ScreenNames> = StackScreenProps<
RootStackParamList,
S
>;