Skip to content

Commit 6e4c270

Browse files
committed
upda
1 parent 1f66a23 commit 6e4c270

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Toast notification utility by Potto.
1414

1515
## Usage & Configs
1616
### No need NPM
17-
Simply put the package into the root path (or anywhere) and reference it appropriately with `import` in any other one of your scripts:
17+
Simply put the package `/toaster/` into the root path (or anywhere) and reference it appropriately with `import` in any other one of your scripts:
1818

1919
```js
2020
//imGonnaMakeAnAnnouncement.js
@@ -65,20 +65,16 @@ Good to go.
6565
---
6666
- `icon: 🟨'string'` Icons
6767

68-
> The package includes `warn` and `stop` icons by default. For custom icons, place your image files in the `./toaster/icons` folder.
68+
> The package includes `warn`, `stop`, and `info` icons by default. For custom icons, place your image files in the `/toaster/icons` folder.
6969
70-
> ℹ️ param `icon` will use the **filename as the lookup**, this is to prevent link breakage by using bundlers.
71-
>
72-
> ex: the icon name is `something.png`
73-
> fill the `icon` parameter as `something`
70+
usage:
7471

7572
```js
7673
pushToast({
7774
title: 'A title about something',
7875
text: 'Something about something',
7976

80-
//something.png -> something
81-
icon: 'something'
77+
icon: 'something.png'
8278
})
8379
```
8480
🚫 Should not co-exist with `iconURL`, it will override each other. (most bottom overwrites)

src/toastTest.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ function demo() {
238238
text: "What would you want to test?",
239239
icon: 'kiwiblowup.jpg',
240240
button: [
241+
{
242+
label: 'Check repository/documentation',
243+
highlight: true,
244+
onClick: () => {
245+
location.assign("https://github.com/Potato22/Toaster")
246+
}
247+
},
241248
{
242249
label: 'Toast layout',
243250
onClick: () => {
@@ -270,7 +277,6 @@ function demo() {
270277
},
271278
{
272279
label: 'get me out of here',
273-
highlight: true,
274280
onClick: () => {
275281
//toastDismiss()
276282
toastPush({

0 commit comments

Comments
 (0)