Toastr.js 668 B

12345678910111213141516171819202122232425262728
  1. export default class Toastr {
  2. constructor(Dcat) {
  3. let _this = this;
  4. Dcat.success = _this.success;
  5. Dcat.error = _this.error;
  6. Dcat.info = _this.info;
  7. Dcat.warning = _this.warning;
  8. Dcat.confirm = _this.confirm;
  9. }
  10. success(message, title, options) {
  11. toastr.success(message, title, options);
  12. }
  13. error(message, title, options) {
  14. toastr.error(message, title, options);
  15. }
  16. info(message, title, options) {
  17. toastr.info(message, title, options);
  18. }
  19. warning(message, title, options) {
  20. toastr.warning(message, title, options);
  21. }
  22. }