@pijushgupta/toastbite 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/package.json +1 -1
package/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Toastbite
|
2
|
+
|
3
|
+
A Vue3 toast plugin inspired from `"Flowbite"` UI
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
` npm i @pijushgupta/toastbite `
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
```js
|
11
|
+
import {useToast} form '@pijushgupta/toastbite';
|
12
|
+
import '@pijushgupta/toastbite/dist/toastbite.css';
|
13
|
+
|
14
|
+
const {addToast} = useToast();
|
15
|
+
|
16
|
+
addToast({
|
17
|
+
location : 'bottom-right',
|
18
|
+
title: 'Info',
|
19
|
+
content: 'The crazy brown fox is old now',
|
20
|
+
icon : '<svg>....</svg>',
|
21
|
+
iconColor: 'toast-blue dark:toast-blue',
|
22
|
+
timeout: false
|
23
|
+
});
|
24
|
+
```
|
25
|
+
|
26
|
+
* location (*string*): `top-right,top-left,top-center,'bottom-left', 'bottom-right', 'bottom-center'`
|
27
|
+
* title (*string*): 'anything'
|
28
|
+
* content (*string*): 'anything'
|
29
|
+
* icon (*string*): `<svg>...</svg>`
|
30
|
+
* iconColor (*string*): default `toast-blue dark:toast-blue`
|
31
|
+
`toast-blue,dark:toast-blue,toast-red,dark:toast-red,toast-orange,dark:toast-orange,toast-amber,dark:toast-amber,toast-yellow,dark:toast-yellow,toast-lime,dark:toast-lime, toast-green, dark:toast-green,toast-emerald,dark:toast-emerald,toast-teal,dark:toast-teal,toast-cyan,dark:toast-cyan,toast-sky,dark:toast-sky,toast-indigo,dark:toast-indigo,toast-violet,dark:toast-violet,toast-purple,dark:toast-purple,toast-fuchsia,dark:toast-fuchsia,toast-pink,dark:toast-pink,toast-rose,dark:toast-rose,toast-slate,dark:toast-slate,toast-gray,dark:toast-gray,toast-zinc,dark:toast-zinc,toast-neutral,dark:toast-neutral,toast-stone,dark:toast-stone`
|
32
|
+
* timeout (*boolean|int*): default 2000
|
33
|
+
|
34
|
+

|