import React, { FC, ReactNode } from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { styles } from './style'; import ChevronLeft from '../../../assets/icons/chevron-left.svg'; type Props = { label: string; rightElement?: ReactNode; }; export const Header: FC = ({ label, rightElement }) => { const navigation = useNavigation(); // navigation.setOptions() TODO return ( navigation.goBack()}> {label} {rightElement ? rightElement : Text} ); };