Aymkdn / v-snackbars

Display the `v-snackbar` (from Vuetify) with a stack display

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to customize button text and button action

b-maslennikov opened this issue · comments

Hi
It would be great to have some additional props for the objects to customize button text and action.
Something like this:
this.objects.push({ message: 'Refresh me', color: 'red', timeout: -1, buttonText: 'refresh', buttonAction: (close) => { close(); window.location.reload(); }})

Also I don't think that actions slot it useful for the multiple snackbars with different buttons. And you cannot have multiple v-snackbars components on the page because of their collision.

I'm super busy at work today. I'll try to reply tonight or tomorrow.

I think you can already do everything you want. Check this demo: https://codesandbox.io/s/v-snackbars-demo-forked-je27y?file=/src/App.vue

I use message as an object and I use the slot to have different actions/labels for the buttons (e.g. by clicking on "Open" it will show an alert with the message).

Hi
I completely forgot about the slots. It makes sense then.
Thank you.