-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: how to create a toast notification
- Loading branch information
1 parent
a52b548
commit 10749b7
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Create a toast notification | ||
|
||
we're using [vue-toastification](https://github.com/Maronato/vue-toastification) to create toast notifications. | ||
|
||
``component.vue`` | ||
```html | ||
<template> | ||
<div> | ||
<button @click="openToast">Open Toast</button> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { useToast } from "vue-toastification"; | ||
export default { | ||
methods: { | ||
openToast() { | ||
const toast = useToast(); | ||
toast.success("Hello World!"); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
``` |