upd: dokumen divisi
Deskripsi; - ui modal salin dan pindah file - button on bottom No Issues
This commit is contained in:
@@ -12,6 +12,7 @@ import ItemDetailMember from "../itemDetailMember";
|
||||
import MenuItemRow from "../menuItemRow";
|
||||
import ModalFloat from "../modalFloat";
|
||||
import ModalSelectMultiple from "../modalSelectMultiple";
|
||||
import ModalSalinMove from "./modalSalinMove";
|
||||
|
||||
|
||||
type Props = {
|
||||
@@ -23,12 +24,20 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
const [isInformasi, setInformasi] = useState(false)
|
||||
const [isRename, setRename] = useState(false)
|
||||
const [isShare, setShare] = useState(false)
|
||||
const [isMoveCopy, setMoveCopy] = useState(false)
|
||||
const [valMoveCopy, setValMoveCopy] = useState<'move' | 'copy'>('copy')
|
||||
const open = useSharedValue(false)
|
||||
|
||||
const onPress = () => {
|
||||
open.value = !open.value;
|
||||
};
|
||||
|
||||
function handleMoveCopy(val: 'copy' | 'move') {
|
||||
setValMoveCopy(val)
|
||||
setModal(false)
|
||||
setMoveCopy(true)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -97,12 +106,12 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="folder-move-outline" color="black" size={25} />}
|
||||
title="Pindah"
|
||||
onPress={() => { }}
|
||||
onPress={() => { handleMoveCopy('move') }}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="folder-multiple-outline" color="black" size={25} />}
|
||||
title="Salin"
|
||||
onPress={() => { }}
|
||||
onPress={() => { handleMoveCopy('copy') }}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="information-variant" color="black" size={25} />}
|
||||
@@ -197,7 +206,9 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
onSelect={() => {
|
||||
ToastAndroid.show('Success', ToastAndroid.SHORT)
|
||||
setShare(false)
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<ModalSalinMove open={isMoveCopy} close={setMoveCopy} category={valMoveCopy} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
51
components/document/modalSalinMove.tsx
Normal file
51
components/document/modalSalinMove.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign, Ionicons } from "@expo/vector-icons"
|
||||
import { Pressable, Text, View } from "react-native"
|
||||
import BorderBottomItem from "../borderBottomItem"
|
||||
import DrawerBottom from "../drawerBottom"
|
||||
|
||||
type Props = {
|
||||
open: boolean
|
||||
close: (value: boolean) => void
|
||||
category: 'copy' | 'move'
|
||||
}
|
||||
|
||||
export default function ModalSalinMove({ open, close, category, }: Props) {
|
||||
return (
|
||||
<DrawerBottom animation="slide" isVisible={open} setVisible={close} title={category == 'copy' ? 'Pilih Lokasi Salin' : 'Pilih Lokasi Pemindahan'} height={75}>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mv05]}>
|
||||
<Text> home </Text>
|
||||
<AntDesign name="right" style={[Styles.mh05, Styles.mt02]} />
|
||||
<Text> folder 1 </Text>
|
||||
</View>
|
||||
<View>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Ionicons name="folder-open-sharp" color={'#f9cc40'} size={30} />}
|
||||
title="Folder 1"
|
||||
titleWeight="normal"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Ionicons name="folder-open-sharp" color={'#f9cc40'} size={30} />}
|
||||
title="Folder 2"
|
||||
titleWeight="normal"
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
icon={<Ionicons name="folder-open-sharp" color={'#f9cc40'} size={30} />}
|
||||
title="Folder 3"
|
||||
titleWeight="normal"
|
||||
/>
|
||||
</View>
|
||||
<View style={[Styles.rowOnly, Styles.mt15, Styles.absolute0]}>
|
||||
<Pressable style={[Styles.pv05, Styles.borderRight, { width: '50%' }]} onPress={() => { close }}>
|
||||
<Text style={[Styles.textDefaultSemiBold, { textAlign: 'center' }]}>BATAL</Text>
|
||||
</Pressable>
|
||||
<Pressable style={[Styles.pv05, { width: '50%' }]} onPress={() => { }}>
|
||||
<Text style={[Styles.textDefaultSemiBold, { textAlign: 'center' }]}>{category == 'copy' ? 'SALIN' : 'PINDAH'}</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user