upd: ui jabatan
Deskripsi: - ui list jabatan - ui filter modal - ui tambah jabatan - ui select option - ui modal select option - ui edit jabatan No Issues
This commit is contained in:
42
components/modalSelect.tsx
Normal file
42
components/modalSelect.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
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'
|
||||
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>
|
||||
<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>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user