ant-design/.dumi/theme/slots/SiteContext.ts
cwg 2627caebb4
fix: site style conflict (#44899)
* fix: site style conflict

* chore: lint

* feat: optimize code
2023-09-15 22:03:53 +08:00

22 lines
556 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: true,
direction: 'ltr',
theme: ['light'],
updateSiteConfig: () => {},
});
export default SiteContext;