primevue-mirror/plugins/app-state.js

32 lines
819 B
JavaScript

//import Noir from '@/themes/app-theme';
import PrimeVue from 'primevue/config';
import Lara from 'primevue/themes/lara';
import { reactive } from 'vue';
const $appState = {
install: (Vue, options) => {
Vue.config.globalProperties.$appState = reactive({
//theme: 'aura-light-green',
darkTheme: false,
codeSandbox: false,
sourceType: 'options-api',
newsActive: false,
announcement: null,
ripple: false,
storageKey: 'primevue'
});
}
};
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use($appState);
nuxtApp.vueApp.use(PrimeVue, {
theme: {
preset: Lara,
options: {
darkModeSelector: '.p-dark'
}
}
});
});