mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
73e541911b
* refactor: rewrite header by FunctionComponent * refactor: rewrite footer by FunctionComponent * fix: strong type * refactor: rewrite IconDisplay & PicSearcher & Category by FunctionComponent * style: formatting * pref: add useCallback/useMemo * refactor: use typescript refactor javascript * fix: remove string * fix: fix eslint
18 lines
465 B
TypeScript
18 lines
465 B
TypeScript
import * as React from 'react';
|
|
import type { DirectionType } from 'antd/es/config-provider';
|
|
|
|
export interface SiteContextProps {
|
|
isMobile: boolean;
|
|
direction: DirectionType;
|
|
theme?: string;
|
|
setTheme?: (theme: string, persist?: boolean) => void;
|
|
setIframeTheme?: (iframeNode: HTMLIFrameElement, theme: string) => void;
|
|
}
|
|
|
|
const SiteContext = React.createContext<SiteContextProps>({
|
|
isMobile: false,
|
|
direction: 'ltr',
|
|
});
|
|
|
|
export default SiteContext;
|