import * as React from 'react'; import { TouchableOpacity, View } from 'react-native'; import Label from './label'; import { TopHeaderLeftArrowIcon } from './icons/top-header-left-arrow'; import Text from './text'; import IconButton from './icon-button'; interface SubPageHeaderProps { height?: string; componentGap?: number; title?: string; funcComponent?: React.ReactNode[]; backgroundColor?: any; subTitle?: string; subContent?: string; exitEvent: () => void; exitIcon?: React.ReactNode; exitIconColor?: string; titleColor?: string; } const SubPageHeader = React.forwardRef( ( { height, componentGap, title, funcComponent, backgroundColor, subTitle, subContent, exitEvent, exitIcon, exitIconColor, titleColor = 'white', }, ref, ) => { return ( <> } hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }} onPress={exitEvent} /> {title && ( {/* )} {funcComponent && funcComponent.map((comp, index) => ( {comp} ))} {subTitle && subTitle.length > 0 && ( {subTitle} )} {subContent && subContent.length > 0 && ( {subContent} )} ); }, ); export default SubPageHeader;