Add toast component documentation
- Add documentation that describes when and how to use a toast message
with code snippets
- Add an informational toast method in the BVToastMixin
- Add BVToastMixin to enhaceApp to register mixin globally.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I89bf2aa8b3fdb9294354a80c98ccf692b6e3615a
diff --git a/src/components/Mixins/BVToastMixin.js b/src/components/Mixins/BVToastMixin.js
index 4fedc9a..538bb93 100644
--- a/src/components/Mixins/BVToastMixin.js
+++ b/src/components/Mixins/BVToastMixin.js
@@ -28,6 +28,15 @@
isStatus: true,
solid: true
});
+ },
+ infoToast(message, title = i18n.t('global.status.informational')) {
+ this.$root.$bvToast.toast(message, {
+ title,
+ variant: 'info',
+ noAutoHide: true,
+ isStatus: true,
+ solid: true
+ });
}
}
};