diff --git a/README.md b/README.md index eeaea88..45e8356 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ HTML: ... + ... @@ -53,6 +59,21 @@ npm install notie ## Usage +#### ES6: +```javascript +import notie from 'notie' +// or +import { alert, force, confirm, input, select, date, setOptions, hideAlerts } from 'notie' +``` + +#### Browser: +```javascript +notie +// or +window.notie +``` + +#### Available methods: ```javascript notie.alert({ type: Number|String, // optional, default = 4, enum: [1, 2, 3, 4, 5, 'success', 'warning', 'error', 'info', 'neutral'] @@ -112,7 +133,8 @@ notie.date({ cancelText: String // optional, default = 'Cancel' }, submitCallbackOptional(date), cancelCallbackOptional(date)) ``` -For example: + +#### For example: ```javascript notie.alert({ text: 'Info!') notie.alert({ type: 1, text: 'Success!', stay: true) // Never hides unless clicked, or escape or enter is pressed @@ -228,7 +250,7 @@ notie.date({ }) ``` -#### Use ES6 to inherit 'this' while using notie +#### Use ES6 to inherit `this`: ``` javascript notie.confirm('Is ES6 great?', 'Yes', 'Cancel', () => { this.location.href = 'htts://google.com' diff --git a/package.json b/package.json index 071cb3b..616bcf0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "notie", "description": "notie - a clean and simple notification, input, and selection suite for javascript, with no dependencies", "author": "Jared Reich", - "version": "4.0.0-rc.3", + "version": "4.0.0", "main": "./dist/notie.min.js", "files": [ "dist/",