I decided to use the Toast component, but because I'm using browserify, I had to put the files together myself. I chose to use .vue files and it worked fine.
However, I ended up looking at the code and noticed how props dont actually take effect when the Toast is triggered:
An event (show::toast) gets triggered with some options.
addToQueue(options) gets called.
show(options) gets called.
show() overrides the props with these options, but if there are none, instead of using the props it will use some defaults.
I decided to use the Toast component, but because I'm using browserify, I had to put the files together myself. I chose to use .vue files and it worked fine.
However, I ended up looking at the code and noticed how props dont actually take effect when the Toast is triggered:
show::toast
) gets triggered with some options.addToQueue(options)
gets called.show(options)
gets called.show()
overrides the props with theseoptions
, but if there are none, instead of using the props it will use some defaults.So basically, instead of
the component does
Which means,
<vs-toast :duration="1000"></vs-toast>
is doing nothing. It's still 6 seconds by default.