Deskripsi: - list member - ui tambah member - ui detail member - ui edit member No Issues
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import Styles from "@/constants/Styles"
|
|
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
|
import { useState } from "react"
|
|
import { View } from "react-native"
|
|
import AlertKonfirmasi from "../alertKonfirmasi"
|
|
import ButtonMenuHeader from "../buttonMenuHeader"
|
|
import DrawerBottom from "../drawerBottom"
|
|
import MenuItemRow from "../menuItemRow"
|
|
import { router } from "expo-router"
|
|
|
|
type Props = {
|
|
id: string | string[]
|
|
}
|
|
|
|
export default function HeaderRightMemberDetail({ id }: Props) {
|
|
const [isVisible, setVisible] = useState(false)
|
|
|
|
return (
|
|
<>
|
|
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
|
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
|
<View style={Styles.rowItemsCenter}>
|
|
<MenuItemRow
|
|
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
|
title="Non Aktifkan"
|
|
onPress={() => {
|
|
AlertKonfirmasi({
|
|
title: 'Konfirmasi',
|
|
desc: 'Apakah anda yakin ingin menonaktifkan data?',
|
|
onPress: () => { }
|
|
})
|
|
}}
|
|
/>
|
|
<MenuItemRow
|
|
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
|
title="Edit"
|
|
onPress={() => {
|
|
setVisible(false)
|
|
router.push(`/member/edit/${id}`)
|
|
}}
|
|
/>
|
|
</View>
|
|
</DrawerBottom>
|
|
</>
|
|
)
|
|
} |