21 lines
371 B
TypeScript
21 lines
371 B
TypeScript
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() }
|
|
},
|
|
]);
|
|
} |