-
-
Notifications
You must be signed in to change notification settings - Fork 644
Expand file tree
/
Copy pathScreenStackHeaderConfigNativeComponent.ts
More file actions
96 lines (86 loc) · 3.26 KB
/
ScreenStackHeaderConfigNativeComponent.ts
File metadata and controls
96 lines (86 loc) · 3.26 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
'use client';
import { codegenNativeComponent } from 'react-native';
import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
type DirectionType = 'rtl' | 'ltr';
// eslint-disable-next-line @typescript-eslint/ban-types
type OnAttachedEvent = Readonly<{}>;
// eslint-disable-next-line @typescript-eslint/ban-types
type OnDetachedEvent = Readonly<{}>;
type OnPressHeaderBarButtonItemEvent = Readonly<{ buttonId: string }>;
type OnPressHeaderBarButtonMenuItemEvent = Readonly<{ menuId: string }>;
type BackButtonDisplayMode = 'minimal' | 'default' | 'generic';
type BlurEffect =
| 'none'
| 'extraLight'
| 'light'
| 'dark'
| 'regular'
| 'prominent'
| 'systemUltraThinMaterial'
| 'systemThinMaterial'
| 'systemMaterial'
| 'systemThickMaterial'
| 'systemChromeMaterial'
| 'systemUltraThinMaterialLight'
| 'systemThinMaterialLight'
| 'systemMaterialLight'
| 'systemThickMaterialLight'
| 'systemChromeMaterialLight'
| 'systemUltraThinMaterialDark'
| 'systemThinMaterialDark'
| 'systemMaterialDark'
| 'systemThickMaterialDark'
| 'systemChromeMaterialDark';
type UserInterfaceStyle = 'unspecified' | 'light' | 'dark';
export interface NativeProps extends ViewProps {
onAttached?: CT.DirectEventHandler<OnAttachedEvent> | undefined;
onDetached?: CT.DirectEventHandler<OnDetachedEvent> | undefined;
backgroundColor?: ColorValue | undefined;
backTitle?: string | undefined;
backTitleFontFamily?: string | undefined;
backTitleFontSize?: CT.Int32 | undefined;
backTitleVisible?: CT.WithDefault<boolean, 'true'>;
color?: ColorValue | undefined;
direction?: CT.WithDefault<DirectionType, 'ltr'>;
hidden?: boolean | undefined;
hideShadow?: boolean | undefined;
largeTitle?: boolean | undefined;
largeTitleFontFamily?: string | undefined;
largeTitleFontSize?: CT.Int32 | undefined;
largeTitleFontWeight?: string | undefined;
largeTitleBackgroundColor?: ColorValue | undefined;
largeTitleHideShadow?: boolean | undefined;
largeTitleColor?: ColorValue | undefined;
translucent?: boolean | undefined;
title?: string | undefined;
titleFontFamily?: string | undefined;
titleFontSize?: CT.Int32 | undefined;
titleFontWeight?: string | undefined;
titleColor?: ColorValue | undefined;
disableBackButtonMenu?: boolean | undefined;
backButtonDisplayMode?: CT.WithDefault<BackButtonDisplayMode, 'default'>;
hideBackButton?: boolean | undefined;
backButtonInCustomView?: boolean | undefined;
blurEffect?: CT.WithDefault<BlurEffect, 'none'>;
// TODO: implement this props on iOS
topInsetEnabled?: boolean | undefined;
headerLeftBarButtonItems?: CT.UnsafeMixed[] | undefined;
headerRightBarButtonItems?: CT.UnsafeMixed[] | undefined;
onPressHeaderBarButtonItem?:
| CT.DirectEventHandler<OnPressHeaderBarButtonItemEvent>
| undefined;
onPressHeaderBarButtonMenuItem?:
| CT.DirectEventHandler<OnPressHeaderBarButtonMenuItemEvent>
| undefined;
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
// Experimental
userInterfaceStyle?: CT.WithDefault<UserInterfaceStyle, 'unspecified'>;
consumeTopInset?: boolean | undefined;
legacyTopInsetBehavior?: boolean | undefined;
}
export default codegenNativeComponent<NativeProps>(
'RNSScreenStackHeaderConfig',
{
interfaceOnly: true,
},
);