2.9.0 • Published 4 years ago

@badu/vue-snackbar v2.9.0

Weekly downloads
8
License
SEE LICENSE IN LI...
Repository
github
Last release
4 years ago

vue-snackbar

Plugin install

npm i @badu/vue-snackbar

Add to App.vue

import SnackbarNotif        from '@badu/vue-snackbar';
Vue.use(SnackbarNotif);

Options

title: message title
text: message description
type: message type > 'success', 'error', 'warning'
duration: message duration, in ms or it will be calculated from message length
cta: call to action (reload page)

Usage

from instance / component

this.$snackbar.show({
    msgTitle:'Someting is wrong',
    msgText:'Please try again',
    type: 'warning'
});

this.$snackbar.show({
    msgTitle:'Hello dear user',
    msgText:'You entered wrong password or username',
    duration: 2000,
    type: 'error'
});

this.$snackbar.show({
    msgTitle:'Hello dear user',
    msgText:'You have successfully logged in'
    type: 'success'
});

with reload call to action

this.$snackbar.show({
    msgTitle:'Hello dear user',
    msgText:'You entered wrong password or username',
    type: 'error',
    cta: true
});

global / store

Vue.$snackbarShow({
    msgTitle:'Hello dear user',
    msgText:'You have successfully logged in',
    type: 'success'
});
2.9.0

4 years ago

2.8.0

4 years ago

2.7.0

4 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago