owp.feedback

1.1.3 • Public • Published

OpenWebProject Feedback

Feedback notifications

Try it

https://andreasarvidsson.github.io/OpenWebProject-Feedback/

Installation

npm install owp.feedback --save

Usage

import Feedback from "owp.feedback";

//Show notification
Feedback.notify("Hello world");

//Or with options
Feedback.notify("Hello altered world", {
    type: "info",
    sticky:false,   
    duration: 1000
});

//Each type has a predefined notification function
Feedback.error("Hello horrible world");
Feedback.success("Hello happy world");

Options

  • type: Color/style of the notification
    • Default: "info"
    • "info", "error", "success", "warn", "grimace", "neutral"
  • sticky: If true the notification will stay until manually closed
    • Default: false
  • duration: Duration in milliseconds until notification closes
    • Defualt: 3000

Package Sidebar

Install

npm i owp.feedback

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

11.8 kB

Total Files

5

Last publish

Collaborators

  • andreas_arvidsson