diff --git a/src/components/composable/useAlert.ts b/src/components/composable/useAlert.ts index 0d21486..aff6d2b 100644 --- a/src/components/composable/useAlert.ts +++ b/src/components/composable/useAlert.ts @@ -1,25 +1,24 @@ import { useToast } from "primevue/usetoast"; -import type IVAlert from "@/components/alert/IVAlert.type.js"; +import type IVAlert from "../alert/IVAlert.type.js"; export function useAlert() { + const toast = useToast(); + const showAlert = ({ title = '', description = '', type = 'info', closeable = true, lifeTime, - }: IVAlert) => { - const toast = useToast(); - + }: IVAlert) => { toast.add({ severity: type, summary: title, detail: description, life: lifeTime, closable: closeable, - }); - }; + }) + } - return { showAlert }; + return { showAlert} } -