Skip to content

Commit

Permalink
Validate Module Exports Client/Server
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSegen committed Apr 29, 2019
1 parent 91a8137 commit 5e4bd73
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 72 deletions.
43 changes: 26 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ Then import toastme


```sh
import toastme from 'toastmejs'
import {toastme} from 'toastmejs'

or

cont toastme = require('toastmejs')
cont {toastme} = require('toastmejs')
```





Expand Down Expand Up @@ -156,30 +157,41 @@ You can customize duration, position, distance, z-index and a ligh theme



First, import the Toastme Class


```sh
import {Toastme} from 'toastmejs'

or

cont {Toastme} = require('toastmejs')
```



You need to declare a new Object with new settings, finally, create a new **Toastme Class** instance.
Then, you need to declare a new Object with your new custom settings and create a new **Toastme Class** instance.





```sh
const config = {
timeout: 5000,
positionY: "bottom", // top or bottom
positionX: "center", // right left, center
distanceY: 20, // Integer value
distanceX: 20, // Integer value
zIndex: 100, // Integer value
ligh: true // Ligh theme
timeout: 5000,
positionY: "bottom", // top or bottom
positionX: "center", // right left, center
distanceY: 20, // Integer value
distanceX: 20, // Integer value
zIndex: 100, // Integer value
ligh: true // Ligh theme
};

const myToast = new Toastme(config);
```


Next, you can call the function with new configurations:
Finally, you can call your new Toastme with new configurations:

```sh
myToast.success('This is a new success notification')
Expand All @@ -206,9 +218,9 @@ toastme.yesNoDialog({
type: "success" // 'success', 'danger', 'warning', 'info' or 'question'
}).then((value) => {
if (value) {
console.log('You clicked Confirm')
console.log('You clicked Confirm')
} else {
console.log('You clicked Cancel')
console.log('You clicked Cancel')
}
});
```
Expand Down Expand Up @@ -238,10 +250,7 @@ Run this command if you need to recompile source files:
$ gulp
```
### Todos
Expand Down
54 changes: 0 additions & 54 deletions gulpfile2.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toastmejs",
"version": "0.1.3",
"version": "1.0.0",
"description": "Web notifications and dialogs with pure javascript",
"main": "./src/js/toastme.js",
"author": {
Expand Down

0 comments on commit 5e4bd73

Please sign in to comment.