import React from "react" ; import { TransitionPresets } from "@react-navigation/stack" ; import { GradientBackground } from "../svg" ; import { HeaderLeftBackButton } from "./button" ; import { View } from "react-native" ; export const PlainHeaderScreenOptionsPreset = { headerTitleAlign : "center" as "left" | "center" , headerStyle : { backgroundColor : "transparent" , elevation : 0 , shadowOpacity : 0 , } , headerBackground : ( ) => < GradientBackground />, headerBackTitleVisible : false , header : undefined , headerLeftContainerStyle : { marginLeft : 10 , } , headerRightContainerStyle : { marginRight : 10 , } , headerLeft : ( props ) => < HeaderLeftBackButton { ... props } / > , ... TransitionPresets . SlideFromRightIOS , } ; export const getPlainHeaderScreenOptionsPresetWithBackgroundColor = ( backgroundColor ) => { return { ... PlainHeaderScreenOptionsPreset , headerBackground : ( ) => ( < View style = { { width : "100%" , height : "100%" , backgroundColor } } />), } ; } ;