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() }
      },
   ]);
}