mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 05:58:07 +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
|
||||
})
|
||||
},
|
||||
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 } = {}) {
|
||||
addNotification({
|
||||
type: 'error',
|
||||
|
||||
Reference in New Issue
Block a user