Added auth functionality, initial work with views and field types
This commit is contained in:
20
frontend/composables/useToast.ts
Normal file
20
frontend/composables/useToast.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { toast as sonnerToast } from 'vue-sonner'
|
||||
|
||||
export const useToast = () => {
|
||||
const toast = {
|
||||
success: (message: string) => {
|
||||
sonnerToast.success(message)
|
||||
},
|
||||
error: (message: string) => {
|
||||
sonnerToast.error(message)
|
||||
},
|
||||
info: (message: string) => {
|
||||
sonnerToast.info(message)
|
||||
},
|
||||
warning: (message: string) => {
|
||||
sonnerToast.warning(message)
|
||||
},
|
||||
}
|
||||
|
||||
return { toast }
|
||||
}
|
||||
Reference in New Issue
Block a user