Skip to content

Commit

Permalink
Update README. Bump version to official release.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredreich committed Feb 26, 2017
1 parent ff0bfe5 commit 9f2d140
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions README.md
Expand Up @@ -37,6 +37,12 @@ HTML:
<head>
...
<link rel="stylesheet" type="text/css" href="https://unpkg.com/notie/dist/notie.min.css">
<style>
/* override styles here */
.notie-container {
box-shadow: none;
}
</style>
</head>
<body>
...
Expand All @@ -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']
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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/",
Expand Down

0 comments on commit 9f2d140

Please sign in to comment.