Files
mobile-darmasaba/components/modalSelectMultiple.tsx
amel 69248290ff upd: dokumen divisi
Deskripsi;
- ui modal salin dan pindah file
- button on bottom

No Issues
2025-03-21 11:46:38 +08:00

52 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>
<View style={[Styles.absolute0, { width: '100%' }]}>
<ButtonForm text="Simpan" onPress={() => { onSelect([{ val: 'dinas', label: 'Dinas' }]) }} />
</View>
</DrawerBottom>
)
}