Created
April 11, 2018 14:23
-
-
Save AlbertoDePena/04a71db622dcfa4b8123db6a692be5f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'toastr/build/toastr.css'; | |
import * as toastr from 'toastr'; | |
toastr.options = { | |
closeButton: false, | |
debug: false, | |
newestOnTop: false, | |
progressBar: false, | |
positionClass: 'toast-bottom-full-width', | |
preventDuplicates: true, | |
onclick: null, | |
showDuration: '300', | |
hideDuration: '1000', | |
timeOut: '5000', | |
extendedTimeOut: '1000', | |
showEasing: 'swing', | |
hideEasing: 'linear', | |
showMethod: 'fadeIn', | |
hideMethod: 'fadeOut' | |
}; | |
export const notifyError = (message: string): void => toastr.error(message); | |
export const notifySuccess = (message: string): void => toastr.success(message); | |
export const notifyWarning = (message: string): void => toastr.warning(message); | |
export const notifyInfo = (message: string): void => toastr.info(message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment