ant-design/.dumi/theme/slots/SiteContext.ts
lijianan ba999de764
chore: site code format (#39457)
* format: site code format

* Conflicting

* lint

* rename
2022-12-19 13:23:28 +08:00

20 lines
507 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;
direction: DirectionType;
theme: ThemeName[];
updateSiteConfig: (props: Partial<SiteContextProps>) => void;
}
const SiteContext = React.createContext<SiteContextProps>({
isMobile: false,
direction: 'ltr',
theme: ['light'],
updateSiteConfig: () => {},
});
export default SiteContext;