@react-navigation/stack#HeaderStyleInterpolators TypeScript Examples

The following examples show how to use @react-navigation/stack#HeaderStyleInterpolators. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx    From krmanga with MIT License 4 votes vote down vote up
function RootStackScreen() {
    return (
        <RootStack.Navigator
            headerMode="float"
            screenOptions={{
                headerTitleAlign: "center",
                headerBackTitleVisible: false,
                headerStyleInterpolator: HeaderStyleInterpolators.forUIKit,
                cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
                gestureEnabled: true,
                gestureDirection: "horizontal",
                // headerStatusBarHeight: headerHeight,
                headerTintColor: Color.white,
                headerStyle: {
                    backgroundColor: Color.theme,
                    ...Platform.select({
                        android: {
                            elevation: 0,
                            borderBottomWidth: StyleSheet.hairlineWidth
                        }
                    })
                }
            }}>
            <RootStack.Screen
                name="BottomTabs"
                options={{
                    headerTransparent: true,
                    headerTitle: ""
                }}
                component={BottomTabs} />
            <RootStack.Screen
                name="Brief"
                component={Brief}
                options={{
                    headerTransparent: true,
                    headerTitle: "",
                    cardStyle: { backgroundColor: Color.page_bg },
                    headerLeft: () => {
                        return null;
                    }
                }}
            />
            <RootStack.Screen
                name="CategorySetting"
                component={CategorySetting}
                options={{
                    headerTitle: "分类设置"
                }}
            />
            <RootStack.Screen
                name="Search"
                component={Search}
                options={{
                    headerTransparent: true,
                    headerTitle: "",
                    headerLeft: () => {
                        return null;
                    }
                }}
            />
            <RootStack.Screen
                name="MangaView"
                component={MangaView}
                options={{
                    headerTransparent: true,
                    headerTitle: "",
                    cardStyle: { backgroundColor: Color.black },
                    headerLeft: () => {
                        return null;
                    }
                }}
            />
            <RootStack.Screen
                name="Guess"
                component={Guess}
            />
            <RootStack.Screen
                name={"Download"}
                component={Download}
                options={{
                    headerTitle: "下载"
                }}
            />
            <RootStack.Screen
                name={"DownloadManage"}
                component={DownloadManage}
                options={{
                    headerTitle: "下载管理"
                }}
            />
            <RootStack.Screen
                name={"ChapterManage"}
                component={ChapterManage}
            />
        </RootStack.Navigator>
    );
}