How to use the toastr.success function in toastr

To help you get started, we’ve selected a few toastr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Lemoncode / react-typescript-samples / 15 Lazy Loading / src / components / member / memberPage.tsx View on Github external
componentWillReceiveProps(nextProps) {
   if(this.props.saveCompleted != nextProps.saveCompleted
      && nextProps.saveCompleted) {

      // Show toast
     toastr.success('Author saved.');

     // using hashHistory, TODO: proper configure browserHistory on app and here
     hashHistory.push('/members')

     // Reset saveCompleted flag
     this.props.resetSaveCompletedFlag();

   }
 }
github Lemoncode / lcFormValidation / samples / react / typescript / 02 QuizForm / src / components / quizForm / quizForm.tsx View on Github external
private showToastr(nextProps: Props) {
    toastr.clear();
    if (nextProps.quizResult.succeeded) {
      toastr.success('Test passed');
    } else {
      toastr.error(nextProps.quizResult.errorMessage);
    }
  }
github brechtbilliet / reactive_apps_workshop / src / authentication / authentication.sandbox.ts View on Github external
private handleAuth(authenticationResult: AuthenticationResult): void {
        window.localStorage.setItem(LOCALSTORAGE_AUTH, JSON.stringify(authenticationResult));
        success("successfully logged in!");
        this.store.dispatch(new SetAuthentication(authenticationResult));
    }
}
github JonJam / yorpw_ui_web / src / components / group / GroupPage.tsx View on Github external
private async updateGroup(viewModel: GroupViewModel) {
    await this.props.updateGroup(viewModel);

    toastr.success(strings.groupPage.updateGroupSuccessMessage);
  }
github weseek / growi / src / client / js / util / apiNotification.js View on Github external
export const toastSuccess = (body, header = 'Success', option = toastrOption.success) => {
  toastr.success(body, header, option);
};
github forCrowd / WealthFramework / ngClient / _system / js / app / factories / logger.ts View on Github external
var write;
        switch (toastType) {
            case "debug": write = $log.debug; break;
            case "error": write = $log.error; break;
            case "info": write = $log.info; break;
            case "success": write = $log.log; break;
            case "warning": write = $log.warn; break;
        }
        write(currentDateTime, message, data);
        var toast = null;
        if (showToast) {
            switch (toastType) {
                case "debug": toast = toastr.info(message, title, optionsOverride); break;
                case "error": toast = toastr.error(message, title, optionsOverride); break;
                case "info": toast = toastr.info(message, title, optionsOverride); break;
                case "success": toast = toastr.success(message, title, optionsOverride); break;
                case "warning": toast = toastr.warning(message, title, optionsOverride); break;
            }
        }
        return toast;
    }
}

toastr

ToastrJS is a JavaScript library for Gnome / Growl type non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.

MIT
Latest version published 7 years ago

Package Health Score

43 / 100
Full package analysis

Popular toastr functions