import { Feather } from "@expo/vector-icons"; import { BlurView, type BlurViewProps } from "expo-blur"; import { Platform } from "react-native"; import { Pressable, type PressableProps } from "react-native-gesture-handler"; import useRouter from "@/hooks/useAppRouter"; interface Props extends BlurViewProps { background?: "blur" | "transparent"; pressableProps?: Omit; } export const HeaderBackButton: React.FC = ({ background = "transparent", pressableProps, ...props }) => { const router = useRouter(); if (Platform.OS === "ios") { return ( router.back()} className='flex items-center justify-center w-9 h-9' {...pressableProps} > ); } if (background === "transparent" && Platform.OS !== "android") return ( router.back()} {...pressableProps}> ); return ( router.back()} // Match the Settings page back button: chevron flush to the edge with a // 16px gap before the title (the old `p-2` pushed both arrow and title // too far right). drop-shadow keeps it readable over images. style={{ marginRight: 16 }} {...pressableProps} > ); };