blob: 6f90d1f1037abdc704cd966713ff281cd184d581 [file] [log] [blame]
Derick Montague4e90eed2020-03-03 18:11:44 -06001<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 Montaguecaaf7ba2020-10-09 11:17:48 -050011import BVToastMixin from './app-imports/BVToastMixin';
Derick Montague4e90eed2020-03-03 18:11:44 -060012export 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>