ant-design/.dumi/theme/slots/SiteContext.ts
MadCcc 4920955741
docs: hide banner (#46730)
* 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>
2024-01-02 17:01:08 +08:00

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;