49 lines
928 B
TypeScript
49 lines
928 B
TypeScript
/*
|
|
* File: Toast.js
|
|
* Description: Utility for displaying toast notifications
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|
|
|
|
import Toast from 'react-native-toast-message';
|
|
//shows success toast
|
|
const showSuccess=(text1='Successfull',text2='')=>{
|
|
|
|
Toast.show({
|
|
type: 'success',
|
|
text1,
|
|
text2
|
|
});
|
|
}
|
|
//shows error text
|
|
const showError=(text1='something went wrong',text2='')=>{
|
|
|
|
Toast.show({
|
|
type: 'error',
|
|
text1,
|
|
text2
|
|
});
|
|
}
|
|
//shows warning text
|
|
const showWarning=(text1='you have some warning',text2='')=>{
|
|
|
|
Toast.show({
|
|
type: 'info',
|
|
text1,
|
|
text2
|
|
});
|
|
}
|
|
|
|
const handleError=()=>{
|
|
|
|
|
|
}
|
|
|
|
export {showSuccess,showError,showWarning,handleError};
|
|
|
|
/*
|
|
* End of File: Toast.js
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|