New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@arturdoruch/process-noticer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arturdoruch/process-noticer

Displays message notices of pending processes

1.0.1
Version published
Maintainers
1
Created

ProcessNoticer

Displays message notices of pending processes (e.g. while sending ajax request). Displays process pending loader.

Install

yarn add @arturdoruch/process-noticer

Usage

import ProcessNoticer from '@arturdoruch/process-noticer';
import '@arturdoruch/process-noticer/styles/process-notice.css';

const processNoticer = new ProcessNoticer();

// Example of usage.
let notice = processNoticer.add('Sending ajax request', true);
processNoticer.display();

setTimeout(function () {
    processNoticer.remove(notice);
}, 3000);

Global options

Global options are the options used by every instance of the ProcessNoticer class. Set by calling function setOptions().

import { setOptions as processNoticerSetOptions } from '@arturdoruch/process-noticer';

processNoticerSetOptions({
    // Options 
});
  • classNamePrefix string (default: ad-process-notice)

    The class name prefix for the list and loader elements.

  • listTag string (default: ul)

  • itemTag string (default: li)

  • centerList boolean (default: false)

    Whether to center displayed process notice list.

Instance options

Instance options are the options applied for specific ProcessNoticer instance.

import ProcessNoticer from '@arturdoruch/process-noticer';

const processNoticer = new ProcessNoticer({
    // options
});
  • listClassName string (default: null)

  • loaderClassName string (default: null)

  • centerList boolean (default: false)

    Whether to center displayed process notice list.

FAQs

Package last updated on 08 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts