2018-01-14 19:22:57 +00:00
|
|
|
import Toast from '../_components/Toast.html'
|
|
|
|
|
|
|
|
let toast
|
|
|
|
|
|
|
|
if (process.browser) {
|
|
|
|
toast = new Toast({
|
|
|
|
target: document.querySelector('#toast')
|
|
|
|
})
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
window.toast = toast // for debugging
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
toast = {
|
|
|
|
say: () => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-09 06:29:29 +00:00
|
|
|
export { toast }
|