This commit is contained in:
Maarten 2024-08-08 14:22:35 +02:00
parent cec664c8d0
commit ff2320f08c
13 changed files with 297 additions and 297 deletions

View file

@ -1,47 +1,47 @@
import Toast from 'react-native-toast-message';
export class Message {
/**
* Set success message
*
* @param message
*/
static success(message: string) {
Message.send('success', message);
}
/**
* Set success message
*
* @param message
*/
static success(message: string) {
Message.send( 'success', message );
}
/**
* Send error message
*
* @param message
*/
static error(message: string) {
Message.send('error', message);
}
/**
* Send error message
*
* @param message
*/
static error(message: string) {
Message.send( 'error', message );
}
/**
* Send info message
*
* @param message
*/
static info(message: string) {
Message.send('info', message);
}
/**
* Send info message
*
* @param message
*/
static info(message: string) {
Message.send( 'info', message );
}
/**
* Send message
*
* @param type
* @param message
*/
static send(type: string, message: string) {
Toast.show({
type: type,
text1: message,
position: 'bottom',
visibilityTime: 2000,
autoHide: true,
})
}
/**
* Send message
*
* @param type
* @param message
*/
static send(type: string, message: string) {
Toast.show( {
type: type,
text1: message,
position: 'bottom',
visibilityTime: 2000,
autoHide: true,
} )
}
}