From b607152cfcb3c975efc6c0752e585e63373c411c Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Wed, 10 Feb 2021 09:33:20 -0800 Subject: Add documentation for BVToastMixin enhancements Includes documentation for multi-lined toast body, refresh app link, and timestamp. Signed-off-by: Yoshie Muranaka Change-Id: Id95e1858a703cc0be44f1f6de51fd6daab24876d --- docs/guide/components/toasts/index.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs/guide/components/toasts/index.md') 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. + +Toast message options example + +```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 -- cgit v1.2.3