14 lines
286 B
JavaScript
14 lines
286 B
JavaScript
|
import { inject } from 'vue';
|
||
|
|
||
|
export const PrimeVueDialogSymbol = Symbol();
|
||
|
|
||
|
export function useDialog() {
|
||
|
const PrimeVueDialog = inject(PrimeVueDialogSymbol);
|
||
|
|
||
|
if (!PrimeVueDialog) {
|
||
|
throw new Error('No PrimeVue Dialog provided!');
|
||
|
}
|
||
|
|
||
|
return PrimeVueDialog;
|
||
|
}
|