You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
835 B
26 lines
835 B
import { computed } from 'vue';
|
|
|
|
import { preferences } from '@vben/preferences';
|
|
import '@vben/styles';
|
|
|
|
import { createDiscreteApi, darkTheme, lightTheme } from 'naive-ui';
|
|
|
|
const themeOverridesProviderProps = computed(() => ({
|
|
themeOverrides: preferences.theme.mode === 'light' ? lightTheme : darkTheme,
|
|
}));
|
|
|
|
const themeProviderProps = computed(() => ({
|
|
theme: preferences.theme.mode === 'light' ? lightTheme : darkTheme,
|
|
}));
|
|
|
|
export const { dialog, loadingBar, message, modal, notification } =
|
|
createDiscreteApi(
|
|
['message', 'dialog', 'notification', 'loadingBar', 'modal'],
|
|
{
|
|
configProviderProps: themeProviderProps,
|
|
loadingBarProviderProps: themeOverridesProviderProps,
|
|
messageProviderProps: themeOverridesProviderProps,
|
|
notificationProviderProps: themeOverridesProviderProps,
|
|
},
|
|
);
|