[Resolved] Different timeout depending on the type of alert #331
Unanswered
CharlyBrocard
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
Sorry for my english, i hope you'll understand what i'm saying.
I wish have different timeout for each type of alert. For example 8s for error alert, 6s for warning alert... I tried to change things in files from node_modules but it didn't work. I'm using Toastification as the component way and so i would like to set these timeout one time in a config file.
Do you have any idea how to do it ?
Have a good day :)
EDIT:
The answer is just written black on white in the documentation, i'm an idiot, sorry.
`import Toast, { TYPE } from "vue-toastification";
const options = {
toastDefaults: {
// ToastOptions object for each type of toast
[TYPE.ERROR]: {
timeout: 10000,
closeButton: false,
},
[TYPE.SUCCESS]: {
timeout: 3000,
hideProgressBar: true,
}
}
};
app.use(Toast, options);`
Beta Was this translation helpful? Give feedback.
All reactions