diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2021-02-10 20:33:20 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2021-02-16 20:31:50 +0300 |
commit | b607152cfcb3c975efc6c0752e585e63373c411c (patch) | |
tree | e61955b4b4892365826e334bdef1359bd4255283 | |
parent | f92e29696d0f01c7fa1941829cb131a708f88393 (diff) | |
download | webui-vue-b607152cfcb3c975efc6c0752e585e63373c411c.tar.xz |
Add documentation for BVToastMixin enhancements
Includes documentation for multi-lined toast body, refresh app link,
and timestamp.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Id95e1858a703cc0be44f1f6de51fd6daab24876d
-rw-r--r-- | docs/guide/components/toasts/index.md | 24 | ||||
-rw-r--r-- | docs/guide/components/toasts/toast-options.png | bin | 0 -> 21356 bytes |
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/guide/components/toasts/index.md b/docs/guide/components/toasts/index.md index 271155a9..2e695f6a 100644 --- a/docs/guide/components/toasts/index.md +++ b/docs/guide/components/toasts/index.md @@ -29,4 +29,28 @@ methods: { this.infoToast('This is an info toast and must be dismissed by the user.'); }, } +``` + +## Additional options + +The first argument for each method will be the toast body content. It accepts a string value or an array of strings for toasts needing to display multiple lines of content. + +The BVToastMixin also accepts additional options as a second argument. Pass an object with a `title` property to change the default toast title. Include a `refreshAction` property, set to true, to include a link that refreshes the application. Include a `timestamp` property, set to true, to include a timestamp in the toast. + +<img src="./toast-options.png" alt="Toast message options example" style="max-width:350px"> + +```js + +methods: { + makeInfoToast() { + this.infoToast([ + 'This is a toast with multi-lined body content.', + 'Just pass an array of strings!' + ], { + title: 'This is an example', + refreshAction: true, + timestamp: true + }) + } +} ```
\ No newline at end of file diff --git a/docs/guide/components/toasts/toast-options.png b/docs/guide/components/toasts/toast-options.png Binary files differnew file mode 100644 index 00000000..f4d725de --- /dev/null +++ b/docs/guide/components/toasts/toast-options.png |