|
@@ -23,6 +23,9 @@
|
|
|
```js
|
|
|
import Toast from "toasters";
|
|
|
|
|
|
+new Toast(options);
|
|
|
+
|
|
|
+// example
|
|
|
new Toast({
|
|
|
content: "Hello World",
|
|
|
persistent: true
|
|
@@ -31,11 +34,19 @@ new Toast({
|
|
|
|
|
|
**Preview:**
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+## Options
|
|
|
+
|
|
|
+| Option | Type | Default | Description |
|
|
|
+| --- | --- | --- | --- |
|
|
|
+| **`content`** | String | `""` | The notification message. |
|
|
|
+| **`persistent`** | Boolean | `false` | Whether or not the toast is persistent. |
|
|
|
+| **`interactable`** | Boolean | `true` | If the toast can be manually closed or not. |
|
|
|
+| **`timeout`** | Number | `6000` | How long till the toast disappears. *Note: will be ignored if the toast is persistent.* |
|
|
|
|
|
|
## Potential future additions
|
|
|
|
|
|
-- Design improvements
|
|
|
- Error handling (i.e. you haven't provided any content for the toast)
|
|
|
- Ability to parse markdown or html
|
|
|
|