Add: - Component alert system - Page collaboration Id Fix: - Box base - Menu drawer dibuatkan interface # No Issue '
32 lines
571 B
TypeScript
32 lines
571 B
TypeScript
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?.(),
|
|
},
|
|
]);
|
|
}
|