Derick Montague | 4e90eed | 2020-03-03 18:11:44 -0600 | [diff] [blame] | 1 | <template> |
| 2 | <div> |
| 3 | <b-button variant="success" @click="makeSuccessToast()">Show Success</b-button> |
| 4 | <b-button variant="danger" @click="makeErrorToast()">Show Error</b-button> |
| 5 | <b-button variant="warning" @click="makeWarningToast()">Show Warning</b-button> |
| 6 | <b-button variant="info" @click="makeInfoToast()">Show Info</b-button> |
| 7 | </div> |
| 8 | </template> |
| 9 | |
| 10 | <script> |
Derick Montague | caaf7ba | 2020-10-09 11:17:48 -0500 | [diff] [blame^] | 11 | import BVToastMixin from './app-imports/BVToastMixin'; |
Derick Montague | 4e90eed | 2020-03-03 18:11:44 -0600 | [diff] [blame] | 12 | export default { |
| 13 | name: 'BmcToasts', |
| 14 | mixins: [BVToastMixin], |
| 15 | methods: { |
| 16 | makeSuccessToast() { |
| 17 | this.successToast('This is a success toast and will be dismissed after 10 seconds.'); |
| 18 | }, |
| 19 | makeErrorToast() { |
| 20 | this.errorToast('This is an error toast and must be dismissed by the user.'); |
| 21 | }, |
| 22 | makeWarningToast() { |
| 23 | this.warningToast('This is a warning toast and must be dismissed by the user.'); |
| 24 | }, |
| 25 | makeInfoToast() { |
| 26 | this.infoToast('This is an info toast and must be dismissed by the user.'); |
| 27 | }, |
| 28 | } |
| 29 | } |
| 30 | </script> |
| 31 | <style scoped> |
| 32 | button { |
| 33 | margin-right: .5rem; |
| 34 | margin-bottom: 1rem; |
| 35 | } |
| 36 | </style> |