primevue-mirror/components/lib/useconfirm/UseConfirm.js

14 lines
298 B
JavaScript
Raw Normal View History

2022-09-06 12:03:37 +00:00
import { inject } from 'vue';
export const PrimeVueConfirmSymbol = Symbol();
export function useConfirm() {
const PrimeVueConfirm = inject(PrimeVueConfirmSymbol);
2022-09-14 11:26:01 +00:00
2022-09-06 12:03:37 +00:00
if (!PrimeVueConfirm) {
throw new Error('No PrimeVue Confirmation provided!');
2022-09-14 11:26:01 +00:00
}
2022-09-06 12:03:37 +00:00
return PrimeVueConfirm;
2022-09-14 11:26:01 +00:00
}