fix : button header
Deskripsi: - semua udh custom button header untuk ios 26 NO Issues
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
import Styles from '@/constants/Styles';
|
||||
import { useRouter } from 'expo-router';
|
||||
import { StyleSheet, Text, View } from 'react-native';
|
||||
import { Text, View } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import ButtonBackHeader from './buttonBackHeader';
|
||||
import Styles from '@/constants/Styles';
|
||||
|
||||
type Props = {
|
||||
title: string;
|
||||
right?: React.ReactNode;
|
||||
showBack?: boolean;
|
||||
onPressLeft?: () => void
|
||||
left?: React.ReactNode
|
||||
};
|
||||
|
||||
export default function AppHeader({ title, right, showBack = true, onPressLeft }: Props) {
|
||||
export default function AppHeader({ title, right, showBack = true, onPressLeft, left }: Props) {
|
||||
const insets = useSafeAreaInsets();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -20,9 +21,11 @@ export default function AppHeader({ title, right, showBack = true, onPressLeft }
|
||||
<View style={Styles.headerApp}>
|
||||
{showBack ? (
|
||||
<ButtonBackHeader onPress={onPressLeft} />
|
||||
) : (
|
||||
<View style={Styles.headerSide} />
|
||||
)}
|
||||
) :
|
||||
left ? left :
|
||||
(
|
||||
<View style={Styles.headerSide} />
|
||||
)}
|
||||
|
||||
<Text style={Styles.headerTitle}>{title}</Text>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user