primevue-mirror/components/useconfirm/UseConfirm.js

12 lines
297 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);
if (!PrimeVueConfirm) {
throw new Error('No PrimeVue Confirmation provided!');
}
return PrimeVueConfirm;
}