notification-bar

1.0.2 • Public • Published

Notification Bar

VIEW DEMO

image

Useage

There're three types of notification

1. Success

    Notify.Success( message [, autoCloseDuration ]);

2. Warning

    Notify.Warning( message [, autoCloseDuration ]);

3. Error

    Notify.Error( message [, autoCloseDuration ]);

Settings

To change the settings, you need to set a options value to the property "Settings" of Notify object.

For example

Notify.Settings = {
                sounds: {
                    success: 'sounds/success,\ warning/5.mp3',
                    warning: 'sounds/success,\ warning/2.mp3',
                    error: 'sounds/errors/1.mp3'
                },
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 0
                }
            };

You can set also one option only. In this case, the default value for sounds will not be deleted.

Notify.Settings = {
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 0
                }
            };

If the duration of the animation is set to 0, then this notification will not closing automatically.

If you want to turn off the sounds then set to the property soundsOff to true

Notify.Settings = {
                soundsOff: false,
                animDuration: {
                    success: 8000,
                    warning: 8000,
                    error: 8000
                }
            };

Readme

Keywords

Package Sidebar

Install

npm i notification-bar

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • burhan-hasan