upd: dokumen divisi

Deskripsi:
- ui menu bottom dan header saat file dokumen sedang keselect
- modal informasi
- ui accordion

- nb : scroll view di modal masih blm bisa

No Issues
This commit is contained in:
amel
2025-03-19 15:28:09 +08:00
parent 3f75d25905
commit f6ac399c06
6 changed files with 296 additions and 15 deletions

View File

@@ -1,25 +1,35 @@
import ButtonBackHeader from "@/components/buttonBackHeader"
import { ButtonHeader } from "@/components/buttonHeader"
import HeaderRightDocument from "@/components/document/headerDocument"
import ItemFile from "@/components/document/itemFile"
import MenuBottomSelectDocument from "@/components/document/menuBottomSelectDocument"
import Styles from "@/constants/Styles"
import { AntDesign, Ionicons, MaterialCommunityIcons } from "@expo/vector-icons"
import { AntDesign, MaterialIcons } from "@expo/vector-icons"
import { router, Stack, useLocalSearchParams } from "expo-router"
import { useState } from "react"
import { SafeAreaView, ScrollView, Text, View } from "react-native"
export default function DocumentDivision() {
const { path } = useLocalSearchParams<{ path?: string }>()
const [isChecked, setIsChecked] = useState(false)
return (
<SafeAreaView>
<Stack.Screen
options={{
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
headerTitle: 'Dokumen Divisi',
headerLeft: () =>
isChecked
? <ButtonHeader item={<MaterialIcons name="close" size={20} color="white" />} onPress={() => { setIsChecked(false) }} />
: <ButtonBackHeader onPress={() => { router.back() }} />,
headerTitle: isChecked ? '1 item terpilih' : 'Dokumen Divisi',
headerTitleAlign: 'center',
headerRight: () => <HeaderRightDocument id={path} />
headerRight: () =>
isChecked
? <ButtonHeader item={<MaterialIcons name="checklist-rtl" size={20} color="white" />} onPress={() => { }} />
: <HeaderRightDocument id={path} />
}}
/>
<ScrollView>
<ScrollView style={{ height: '100%' }}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text> home </Text>
@@ -27,13 +37,16 @@ export default function DocumentDivision() {
<Text> folder 1 </Text>
</View>
<View>
<ItemFile category="folder" title="Folder Pertama" dateTime="05-02-2025 07:54" />
<ItemFile category="folder" title="Folder Pertama" dateTime="05-02-2025 07:54" onChecked={() => { setIsChecked(!isChecked) }} checked={isChecked} />
<ItemFile category="file" title="Images.jpg" dateTime="05-11-2024 07:54" />
<ItemFile category="folder-shared" title="Folder shared" dateTime="05-11-2024 07:54" />
<ItemFile category="file-shared" title="images-shared.pdf" dateTime="05-11-2024 07:54" />
</View>
</View>
</ScrollView>
{
isChecked && <MenuBottomSelectDocument />
}
</SafeAreaView>
)
}