forked from sumup-oss/circuit-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoczrc.js
66 lines (63 loc) · 1.65 KB
/
doczrc.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import { babel } from 'docz-plugin-babel6';
import { circuit as theme } from './themes';
export default {
title: 'Circuit UI',
dest: './dist',
base: '/',
plugins: [babel()],
modifyBabelRc: config => config,
indexHtml: 'docs/index.html',
hashRouter: true,
themeConfig: {
colors: {
white: theme.colors.white,
grayExtraLight: theme.colors.n100,
grayLight: theme.colors.n300,
gray: theme.colors.n500,
grayDark: theme.colors.n700,
grayExtraDark: theme.colors.n900,
dark: theme.colors.n900,
blue: theme.colors.b500,
skyBlue: theme.colors.b300,
primary: theme.colors.b500,
text: theme.colors.n900,
link: theme.colors.p500,
footerText: theme.colors.n700,
sidebarBg: theme.colors.n100,
sidebarText: theme.colors.n900,
background: theme.colors.white,
border: theme.colors.n300,
theadColor: theme.colors.n500,
theadBg: theme.colors.n300,
tableColor: theme.colors.n700,
tooltipBg: theme.colors.n900,
tooltipColor: theme.colors.n100,
codeBg: theme.colors.n100,
codeColor: theme.colors.n700,
preBg: theme.colors.n100
},
styles: {
body: {
fontFamily:
'aktiv-grotesk, -apple-system, BlinkMacSystemFont, "Segoe UI"'
}
}
},
modifyBundlerConfig: config => {
const idx = config.module.rules.findIndex(
r => r.test.toString() === '/\\.(svg)(\\?.*)?$/'
);
config.module.rules[idx] = {
test: /\.svg$/,
use: [
{
loader: 'react-svg-loader',
options: {
es5: true
}
}
]
};
return config;
}
};