upd: profile
Deskripsi: - ui profile - ui button right header - ui alert konfirmasi No Issues
This commit is contained in:
21
components/alertKonfirmasi.ts
Normal file
21
components/alertKonfirmasi.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Alert } from "react-native";
|
||||
|
||||
|
||||
type Props = {
|
||||
title: string,
|
||||
desc: string
|
||||
onPress: () => void
|
||||
}
|
||||
|
||||
export default function AlertKonfirmasi({ title, desc, onPress }: Props) {
|
||||
Alert.alert(title, desc, [
|
||||
{
|
||||
text: 'Tidak',
|
||||
style: 'cancel',
|
||||
},
|
||||
{
|
||||
text: 'Ya',
|
||||
onPress: () => { onPress() }
|
||||
},
|
||||
]);
|
||||
}
|
||||
17
components/buttonMenuHeader.tsx
Normal file
17
components/buttonMenuHeader.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Feather } from "@expo/vector-icons"
|
||||
import { ButtonHeader } from "./buttonHeader"
|
||||
|
||||
type Props = {
|
||||
onPress?: () => void
|
||||
}
|
||||
|
||||
export default function ButtonMenuHeader({ onPress }: Props) {
|
||||
return (
|
||||
<>
|
||||
<ButtonHeader
|
||||
item={<Feather name="menu" size={20} color="white" />}
|
||||
onPress={onPress}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -8,8 +8,8 @@ export function HeaderRightHome() {
|
||||
return (
|
||||
<View style={[Styles.rowSpaceBetween, { width: 140 }]}>
|
||||
<ButtonHeader item={<Feather name="search" size={20} color="white" />} onPress={() => { router.push('/search') }} />
|
||||
<ButtonHeader item={<Feather name="bell" size={20} color="white" />} onPress={() => { router.push('/') }} />
|
||||
<ButtonHeader item={<Feather name="user" size={20} color="white" />} onPress={() => { router.push('/') }} />
|
||||
<ButtonHeader item={<Feather name="bell" size={20} color="white" />} onPress={() => { router.push('/notification') }} />
|
||||
<ButtonHeader item={<Feather name="user" size={20} color="white" />} onPress={() => { router.push('/profile') }} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user