Feature:
Add: - Component alert system - Page collaboration Id Fix: - Box base - Menu drawer dibuatkan interface # No Issue '
This commit is contained in:
31
components/Alert/AlertDefaultSystem.ts
Normal file
31
components/Alert/AlertDefaultSystem.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Alert } from "react-native";
|
||||
|
||||
export default function AlertDefaultSystem({
|
||||
title,
|
||||
message,
|
||||
textLeft,
|
||||
textRight,
|
||||
onPressLeft,
|
||||
onPressRight,
|
||||
}: {
|
||||
title: string;
|
||||
message: string;
|
||||
textLeft: string;
|
||||
textRight: string;
|
||||
onPressLeft?: () => void;
|
||||
onPressRight?: () => void;
|
||||
}) {
|
||||
return Alert.alert(title, message, [
|
||||
{
|
||||
style: "cancel",
|
||||
text: textLeft,
|
||||
onPress: () => onPressLeft?.(),
|
||||
},
|
||||
{
|
||||
style: "default",
|
||||
text: textRight,
|
||||
isPreferred: true,
|
||||
onPress: () => onPressRight?.(),
|
||||
},
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user