upd: dokumen divisi
- Deskripsi: - share dokumen divisi - ui modal share dokumen diviis No Issues
This commit is contained in:
50
components/modalSelectMultiple.tsx
Normal file
50
components/modalSelectMultiple.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user