upd: ui group
Deskripsi: - ui page group - ui tab button - ui list data group - ui modal bottom drawer - ui menu item row - ui tambah data No Issues
This commit is contained in:
31
components/drawerBottom.tsx
Normal file
31
components/drawerBottom.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { MaterialIcons } from "@expo/vector-icons"
|
||||
import { Modal, Pressable, Text, View } from "react-native"
|
||||
|
||||
type Props = {
|
||||
isVisible: boolean
|
||||
setVisible: (value: boolean) => void
|
||||
title?: string
|
||||
children: React.ReactNode
|
||||
animation: 'slide' | 'none' | 'fade'
|
||||
}
|
||||
|
||||
export default function DrawerBottom({ isVisible, setVisible, title, children, animation }: Props) {
|
||||
return (
|
||||
<Modal animationType={animation} transparent={true} visible={isVisible}>
|
||||
<View style={[Styles.modalBgTransparant]}>
|
||||
<View style={Styles.modalContent}>
|
||||
<View style={Styles.titleContainer}>
|
||||
<Text style={Styles.textDefault}>{title}</Text>
|
||||
<Pressable onPress={() => setVisible(false)}>
|
||||
<MaterialIcons name="close" color="black" size={22} />
|
||||
</Pressable>
|
||||
</View>
|
||||
<View style={Styles.contentContainer}>
|
||||
{children}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user