mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 11:47:55 +01:00
feat(toast): add aliases for info and warning notifications
This commit is contained in:
@@ -35,6 +35,22 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
timeout
|
timeout
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
info ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
|
addNotification({
|
||||||
|
type: 'info',
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
timeout
|
||||||
|
})
|
||||||
|
},
|
||||||
|
warning ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
|
addNotification({
|
||||||
|
type: 'warning',
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
timeout
|
||||||
|
})
|
||||||
|
},
|
||||||
error ({ title = 'An error occurred!', description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
error ({ title = 'An error occurred!', description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
addNotification({
|
addNotification({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|||||||
Reference in New Issue
Block a user