28 lines
679 B
TypeScript
28 lines
679 B
TypeScript
![]() |
import { Locale } from 'antd/es/locale';
|
||
|
import enUS from 'antd/es/locale/en_US';
|
||
|
import zhCN from 'antd/es/locale/zh_CN';
|
||
|
|
||
|
import { createContext } from 'react';
|
||
|
|
||
|
import { LocaleType, ThemeContextType, ThemeState } from './types';
|
||
|
|
||
|
export const localeData: Record<string, Locale> = {
|
||
|
en_US: enUS,
|
||
|
zh_CN: zhCN,
|
||
|
};
|
||
|
export const locales: LocaleType[] = [
|
||
|
{
|
||
|
name: 'en_US',
|
||
|
label: '🇺🇸 english(US)',
|
||
|
},
|
||
|
{
|
||
|
name: 'zh_CN',
|
||
|
label: '🇨🇳 简体中文',
|
||
|
},
|
||
|
];
|
||
|
export const defaultThemeConfig: ThemeState = {
|
||
|
mode: 'light',
|
||
|
compact: false,
|
||
|
};
|
||
|
export const ThemeContext = createContext<ThemeContextType | null>(null);
|