primevue-mirror/components/lib/usedialog/UseDialog.js

14 lines
286 B
JavaScript
Raw Normal View History

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