fix : button header

Deskripsi:
- semua udh custom button header untuk ios 26

NO Issues
This commit is contained in:
2026-01-28 17:42:37 +08:00
parent 7a589e11e4
commit 6cc5d07017
34 changed files with 811 additions and 351 deletions

View File

@@ -1,5 +1,5 @@
import AlertKonfirmasi from "@/components/alertKonfirmasi";
import ButtonBackHeader from "@/components/buttonBackHeader";
import AppHeader from "@/components/AppHeader";
import { ButtonHeader } from "@/components/buttonHeader";
import HeaderRightDocument from "@/components/document/headerDocument";
import ItemFile from "@/components/document/itemFile";
@@ -337,39 +337,74 @@ export default function DocumentDivision() {
<SafeAreaView>
<Stack.Screen
options={{
headerLeft: () =>
selectedFiles.length > 0 || dariSelectAll ? (
<ButtonHeader
item={<MaterialIcons name="close" size={20} color="white" />}
onPress={() => {
handleBatal();
}}
/>
) : (
<ButtonBackHeader
onPress={() => {
router.back();
}}
/>
),
// headerLeft: () =>
// selectedFiles.length > 0 || dariSelectAll ? (
// <ButtonHeader
// item={<MaterialIcons name="close" size={20} color="white" />}
// onPress={() => {
// handleBatal();
// }}
// />
// ) : (
// <ButtonBackHeader
// onPress={() => {
// router.back();
// }}
// />
// ),
headerTitle:
selectedFiles.length > 0 || dariSelectAll
? `${selectedFiles.length} item terpilih`
: "Dokumen Divisi",
headerTitleAlign: "center",
headerRight: () =>
selectedFiles.length > 0 || dariSelectAll ? (
<ButtonHeader
item={
<MaterialIcons name="checklist-rtl" size={20} color="white" />
}
onPress={() => {
handleSelectAll();
}}
/>
) : (
<HeaderRightDocument path={path} isMember={isMemberDivision} />
),
// headerRight: () =>
// selectedFiles.length > 0 || dariSelectAll ? (
// <ButtonHeader
// item={
// <MaterialIcons name="checklist-rtl" size={20} color="white" />
// }
// onPress={() => {
// handleSelectAll();
// }}
// />
// ) : (
// <HeaderRightDocument path={path} isMember={isMemberDivision} />
// ),
header: () => (
<AppHeader
title={
selectedFiles.length > 0 || dariSelectAll
? `${selectedFiles.length} item terpilih`
: "Dokumen Divisi"
}
showBack={(selectedFiles.length > 0 || dariSelectAll) ? false : true}
left={
<ButtonHeader
item={<MaterialIcons name="close" size={20} color="white" />}
onPress={() => {
handleBatal();
}}
/>
}
onPressLeft={() => {
(selectedFiles.length > 0 || dariSelectAll) ? handleBatal() : router.back();
}}
right={
selectedFiles.length > 0 || dariSelectAll ? (
<ButtonHeader
item={
<MaterialIcons name="checklist-rtl" size={20} color="white" />
}
onPress={() => {
handleSelectAll();
}}
/>
) : (
<HeaderRightDocument path={path} isMember={isMemberDivision} />
)
}
/>
)
}}
/>
<ModalLoading isVisible={loadingOpen} setVisible={setLoadingOpen} />