12 lines
285 B
JavaScript
12 lines
285 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;
|
||
|
}
|