This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
|
import { ref } from 'vue';
|
|
|
|
export default function useAlert() {
|
|
const alertIsVisible = ref(false);
|
|
|
|
function showAlert() {
|
|
alertIsVisible.value = true;
|
|
}
|
|
function hideAlert() {
|
|
alertIsVisible.value = false;
|
|
}
|
|
|
|
return [alertIsVisible, showAlert, hideAlert];
|
|
}
|