New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

handy-notification

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handy-notification

Google+ style notification which comes from the bottom to notify!!

latest
Source
npmnpm
Version
1.2.8
Version published
Weekly downloads
73
69.77%
Maintainers
1
Weekly downloads
 
Created
Source

Handy-Notification

Google+ style notification which comes from the bottom to notify.

Demo

npm version

Screenshot

alt text

The above screenshot is from React-Instagram-clone-2.0

Usage

  • First install the package with npm or Yarn.

    # with npm
    npm install handy-notification
    
    # or with Yarn
    yarn add handy-notification
    
  • Create a div with class handy-notify.

    <div class='handy-notify'>
        <span></span>
    </div>
    
  • And here comes the fun part.

    import Notify from 'handy-notification'
    Notify({
        value: "Hello, how are you?",   // Message to be displayed
        onClick: e => console.log('Clicked!!'),  // Function executed when clicked on the notification bar
        done: () => console.log('I notified you & went back to the bottom!')    // function to be executed when you're notified
    })
    

Example

npm run example

Run the above command and open http://localhost:7007

API

Notify(options:Object)
options = {
    beforeTop: String,
    afterTop: String,
    value: String,
    selector: jQueryElement,
    onClick: Function,
    done: Function
}
beforeTop:
Initial top position which keeps the notification bar at the bottom to hide it. Default top style is 105%.
afterTop
Top position where it comes from the bottom & stops to notify you. Default top style is 90%.
value
This will be the message.
selector
Selector you just created.
onClick
Function executed when clicked on the notification bar.
done
Function executed when you're notified.

Contribute

Show your support by 🌟 the project!!

Feel free to contribute!!

Thanks for reading!!

Keywords

google+

FAQs

Package last updated on 22 Jul 2018

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