0.1.61 • Published 8 years ago

feedback.js v0.1.61

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

feedback.js

Emit simple custom feedback messages.

Install

Get it using npm.

npm install feedback.js --save

CSS

You can usxe the css by directly importing the mains.css from the dist folder.

@import "../node_modules/feedback.js/dist/main.css";

Usage

Check out live demo.

Feedback.emit(options)

options

Type: object

options.message

Type: string Default: Unknown error.

Feedback message to be displayed

options.status

Type: string Default: error

error or success, it stands for the class that will be added in the feedback element.

options.delay

Type: number Default: it calculates the readtime by 4 words per second

Delay between the feedback entering and leaving the screen. This option is extremely optional, sice it automaticaly calculates the time at 4 words per second, but you can pass a custom number in milisseconds.

Example

    Feedback.emit({
      message: 'Something went wrong. Please wait.',
      status: 'error'
    });

Queue feature

feedback.js has the Queue feature, that allows you to emit how many messages you want, and they will be displayed one by one.

TODO

  • Create queue feature.
  • Create the bool options.closeByClick.
  • Create the false value to option.delay, for a infinite feedback.
  • Create the bool options.queue.

License

MIT

0.1.61

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago