ant-design/.dumi/theme/slots/DemoContext.ts
gin-lsl 72b5263344
site: sync all code type of demos when change one of them (#48436)
* site: sync all code type of demos when change one of them

* site: remove localStorage

---------

Co-authored-by: afc163 <afc163@gmail.com>
Co-authored-by: Peach <scdzwyxst@gmail.com>
2024-04-13 23:11:29 +08:00

16 lines
329 B
TypeScript

import { createContext } from 'react';
export type DemoContextProps = {
showDebug?: boolean;
codeType?: string;
};
const DemoContext = createContext<{
showDebug?: boolean;
setShowDebug?: (showDebug: boolean) => void;
codeType?: string;
setCodeType?: (codeType: string) => void;
}>({});
export default DemoContext;