Files
mobile-darmasaba/components/modalSelect.tsx
amel 4139c95794 upd: project
Deskripsi:
- update button save pada tambah edit project
- ui edit tugas dan tanggal project
- modal menu detail tugas dan tanggal
- modal menu detail file
- modal menu detail anggota project

No Issues
2025-03-13 14:56:24 +08:00

62 lines
2.3 KiB
TypeScript

import { Pressable, Text, View } from "react-native"
import DrawerBottom from "./drawerBottom"
import Styles from "@/constants/Styles"
import { AntDesign } from "@expo/vector-icons"
import { useState } from "react"
type Props = {
open: boolean
close: (value: boolean) => void
title: string
category: 'group' | 'status-task'
choose: string
onSelect: (value: { val: string, label: string }) => void
}
export default function ModalSelect({ open, close, title, category, choose, onSelect }: Props) {
const [isChoose, setChoose] = useState(choose)
return (
<DrawerBottom animation="none" isVisible={open} setVisible={close} title={title} height={75}>
<View>
{
category == 'group' ?
<>
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
onSelect({ val: 'dinas', label: 'Dinas' })
setChoose('dinas')
close(false)
}}>
<Text style={[Styles.textDefaultSemiBold]}>Dinas</Text>
<AntDesign name="check" size={20} />
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>Adat</Text>
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>Karang Taruna</Text>
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>PKK</Text>
</Pressable>
</>
:
<>
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
onSelect({ val: 'blm-dikerjakan', label: 'Belum Dikerjakan' })
setChoose('blm-dikerjakan')
close(false)
}}>
<Text style={[Styles.textDefaultSemiBold]}>Belum Dikerjakan</Text>
<AntDesign name="check" size={20} />
</Pressable>
<Pressable style={[Styles.itemSelectModal]}>
<Text>Selesai</Text>
</Pressable>
</>
}
</View>
</DrawerBottom>
)
}