thêm toast, thêm logic cho phần ButtonCreateNewHaulOrTrip
This commit is contained in:
29
services/toast_service.tsx
Normal file
29
services/toast_service.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import Toast from "react-native-toast-message";
|
||||
|
||||
export function showInfoToast(message: string) {
|
||||
Toast.show({
|
||||
type: "info",
|
||||
text1: message,
|
||||
});
|
||||
}
|
||||
|
||||
export function showSuccessToast(message: string) {
|
||||
Toast.show({
|
||||
type: "success",
|
||||
text1: message,
|
||||
});
|
||||
}
|
||||
|
||||
export function showErrorToast(message: string) {
|
||||
Toast.show({
|
||||
type: "error",
|
||||
text1: message,
|
||||
});
|
||||
}
|
||||
|
||||
export function showWarningToast(message: string) {
|
||||
Toast.show({
|
||||
type: "warn",
|
||||
text1: message,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user