-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgatsby-browser.js
43 lines (39 loc) · 1.31 KB
/
gatsby-browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// require global css
import './src/style/global.less';
import './static/iconfont.css';
import 'antd/lib/popover/style/index.css';
import 'antd/lib/upload/style/index.css';
import 'antd/lib/modal/style/index.css';
import 'antd/lib/icon/style/index.css';
import React from 'react';
import { MDXProvider } from '@mdx-js/react';
// 设计案例
import DesignCase from './src/components/graphDetail/DesignCase';
// 制作教程
import { ProductionTutorials } from './src/components/graphDetail/ProductionTutorials';
// 参考文献
import { Reference } from './src/components/graphDetail/Reference';
// 贡献者
import { Contributors } from './src/components/graphDetail/Contributors';
// 相似图表
import { SimilarCharts } from './src/components/graphDetail/SimilarCharts';
import { ChartProps } from './src/components/graphDetail/ChartProps';
const PlaceHolder = ({ children }) => {
return <em style={{ opacity: 0.65 }}>{children}</em>;
}
// wrap App root components
// provider must display here
export const wrapPageElement = ({ element}) => {
return (
<MDXProvider components={{
PlaceHolder,
DesignCaseContainer: DesignCase.Container,
DesignCaseItem: DesignCase.Item,
ProductionTutorials,
Reference,
Contributors,
ChartProps,
SimilarCharts,
}}>{element}</MDXProvider>
)
}