diff --git a/src/components/toast/README.md b/src/components/toast/README.md index c4fefcf6f7a..0cdc46ac860 100644 --- a/src/components/toast/README.md +++ b/src/components/toast/README.md @@ -272,6 +272,58 @@ When auto-hide is enabled, hovering over the toast will pause the auto-hide time the toast, the auto-hide timer will be resumed. You can disable this feature by setting the `no-hover-pause` prop to `true`. +### Close button + +Toasts have a close button to hide them on use click by default. Setting the `no-close-button` prop +to `true` will prevent this and creates a toast without the default close button. + +It is still possible to create a custom close button for the toast by providing a unique ID and use +the `this.$bvToast.hide(id)` method to hide the specific toast: + +```html + + + + + +``` + ### Toast roles Toasts are rendered with a default `role` attribute of `'alert'` and `aria-live` attribute of @@ -428,7 +480,7 @@ for generating more complex toast content: ```html @@ -440,7 +492,7 @@ for generating more complex toast content: } }, methods: { - popToast() { + showToast() { // Use a shorter name for this.$createElement const h = this.$createElement // Increment the toast count