Files
mobile-darmasaba/components/modalSelectMultiple.tsx
amel 7e828a7ad9 upd: dokumen divisi
- Deskripsi:
- share dokumen divisi
- ui modal share dokumen diviis

No Issues
2025-03-20 14:23:22 +08:00

50 lines
1.9 KiB
TypeScript

import Styles from "@/constants/Styles"
import { AntDesign } from "@expo/vector-icons"
import { useState } from "react"
import { Pressable, Text, View } from "react-native"
import { ButtonForm } from "./buttonForm"
import DrawerBottom from "./drawerBottom"
type Props = {
open: boolean
close: (value: boolean) => void
title: string
category: 'share-division' | 'status-task'
choose: string
onSelect: (value: { val: string, label: string }[]) => void
}
export default function ModalSelectMultiple({ open, close, title, category, choose, onSelect }: Props) {
const [isChoose, setChoose] = useState(choose)
return (
<DrawerBottom animation="slide" isVisible={open} setVisible={close} title={title} height={75}>
<View>
{
category == 'share-division' ?
<>
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
setChoose('dinas')
close(false)
}}>
<Text style={[Styles.textDefaultSemiBold]}>Sosial Kemasyarakatan</Text>
<AntDesign name="check" size={20} />
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>Kaur Pemerintahan</Text>
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>Kasi Kemasyarakatan</Text>
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>PKK</Text>
</Pressable>
</>
:
<></>
}
</View>
<ButtonForm text="Simpan" onPress={() => { onSelect([{ val: 'dinas', label: 'Dinas' }]) }} />
</DrawerBottom>
)
}