refactor src folder structure
This commit is contained in:
parent
0bfb70af8b
commit
d0e26e2882
30 changed files with 94 additions and 134 deletions
|
@ -1,47 +0,0 @@
|
|||
import Toast from 'react-native-toast-message';
|
||||
|
||||
export class 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 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,
|
||||
} )
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue