mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-15 04:29:37 +01:00
fix(plugins): error in provides
This commit is contained in:
@@ -26,7 +26,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
|
||||
return {
|
||||
provide: {
|
||||
copy
|
||||
clipboard: {
|
||||
copy
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -25,39 +25,41 @@ export default defineNuxtPlugin(() => {
|
||||
|
||||
return {
|
||||
provide: {
|
||||
addNotification,
|
||||
removeNotification,
|
||||
success ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||
addNotification({
|
||||
type: 'success',
|
||||
title,
|
||||
description,
|
||||
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',
|
||||
title,
|
||||
description,
|
||||
timeout
|
||||
})
|
||||
toast: {
|
||||
addNotification,
|
||||
removeNotification,
|
||||
success ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||
addNotification({
|
||||
type: 'success',
|
||||
title,
|
||||
description,
|
||||
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',
|
||||
title,
|
||||
description,
|
||||
timeout
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user