mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 04:18:28 +08:00
4920955741
* docs: hide banner * chore: code clean * Update GlobalLayout.tsx Signed-off-by: lijianan <574980606@qq.com> --------- Signed-off-by: lijianan <574980606@qq.com> Co-authored-by: afc163 <afc163@gmail.com> Co-authored-by: lijianan <574980606@qq.com>
22 lines
557 B
TypeScript
22 lines
557 B
TypeScript
import * as React from 'react';
|
|
import type { DirectionType } from 'antd/es/config-provider';
|
|
import type { ThemeName } from '../common/ThemeSwitch';
|
|
|
|
export interface SiteContextProps {
|
|
isMobile: boolean;
|
|
bannerVisible: boolean;
|
|
direction: DirectionType;
|
|
theme: ThemeName[];
|
|
updateSiteConfig: (props: Partial<SiteContextProps>) => void;
|
|
}
|
|
|
|
const SiteContext = React.createContext<SiteContextProps>({
|
|
isMobile: false,
|
|
bannerVisible: false,
|
|
direction: 'ltr',
|
|
theme: ['light'],
|
|
updateSiteConfig: () => {},
|
|
});
|
|
|
|
export default SiteContext;
|