summaryrefslogtreecommitdiff
path: root/src/components/Mixins/BVToastMixin.js
blob: 489173c9b88d73bb117379aafbba67ba7e750674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const BVToastMixin = {
  methods: {
    successToast(message) {
      this.$root.$bvToast.toast(message, {
        title: 'Success',
        variant: 'success',
        autoHideDelay: 10000, //auto hide in milliseconds
        isStatus: true,
        solid: true
      });
    },
    errorToast(message) {
      this.$root.$bvToast.toast(message, {
        title: 'Error',
        variant: 'danger',
        noAutoHide: true,
        isStatus: true,
        solid: true
      });
    }
  }
};

export default BVToastMixin;