diff --git a/.dumi/theme/layouts/GlobalLayout.tsx b/.dumi/theme/layouts/GlobalLayout.tsx new file mode 100644 index 0000000..0281ec5 --- /dev/null +++ b/.dumi/theme/layouts/GlobalLayout.tsx @@ -0,0 +1,21 @@ +import { ConfigProvider, theme } from 'antd'; +// @ts-ignore dumi 实际上导出了 +import { useOutlet, usePrefersColor } from 'dumi'; +import React from 'react'; + +const GlobalLayout: React.FC = () => { + const outlet = useOutlet(); + const [color] = usePrefersColor(); + + return ( + + {outlet} + + ); +}; + +export default GlobalLayout; diff --git a/.dumi/tsconfig.json b/.dumi/tsconfig.json new file mode 100644 index 0000000..a32dd4f --- /dev/null +++ b/.dumi/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.json", + "include": ["**/*"] +} diff --git a/.gitignore b/.gitignore index fc3ead2..c7767b3 100644 --- a/.gitignore +++ b/.gitignore @@ -78,4 +78,4 @@ jspm_packages/ # Build dist docs-dist -.dumi +.dumi/tmp diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 4131afc..d58781f 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -8,7 +8,8 @@ "./*.?*.ts", "src", // test workspace lint - "__tests__" + "__tests__", + ".dumi/theme" ], "exclude": ["node_modules", "dist"] }