-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
94 lines (91 loc) · 2.45 KB
/
styleguide.config.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
const path = require('path');
const webPackPath = require('./webpack/webpack.styleguide');
const spaceFactor = 8;
module.exports = {
styleguideComponents: {
Wrapper: path.join(__dirname, 'app/utils/styleguide/Wrapper'),
LogoRenderer: path.join(__dirname, 'app/utils/styleguide/components/Logo'),
StyleGuideRenderer: path.join(__dirname, 'app/utils/styleguide/components/StyleGuide'),
SectionsRenderer: path.join(__dirname, '/app/utils/styleguide/components/SectionsRenderer'),
},
showSidebar: true,
components: './app/components/**/*.jsx',
webpackConfig: webPackPath,
skipComponentsWithoutExample: true,
ignore: ['./app/components/**/languageModule.jsx'],
theme: {
baseBackground: '#fdfdfc',
link: '#274e75',
linkHover: '#90a7bf',
border: '#e0d2de',
font: ['Helvetica', 'sans-serif'],
space: [
spaceFactor / 2, // 4
spaceFactor, // 8
spaceFactor * 2, // 16
spaceFactor * 3, // 24
spaceFactor * 4, // 32
spaceFactor * 5, // 40
spaceFactor * 6, // 48
],
color: {
light: '#767676',
lightest: '#ccc',
link: '#FFF',
linkHover: '#00ff73',
focus: 'rgba(22, 115, 177, 0.25)',
border: '#e8e8e8',
name: '#690',
type: '#905',
error: '#c00',
baseBackground: '#fff',
codeBackground: '#f5f5f5',
sidebarBackground: '#f5f5f5',
ribbonBackground: '#e90',
ribbonText: '#fff',
// Based on default Prism theme
codeBase: '#333',
codeComment: '#6d6d6d',
codePunctuation: '#999',
codeProperty: '#905',
codeDeleted: '#905',
codeString: '#690',
codeInserted: '#690',
codeOperator: '#9a6e3a',
codeKeyword: '#1673b1',
codeFunction: '#DD4A68',
codeVariable: '#e90',
},
fontFamily: {
base: [
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'"Roboto"',
'"Oxygen"',
'"Ubuntu"',
'"Cantarell"',
'"Fira Sans"',
'"Droid Sans"',
'"Helvetica Neue"',
'sans-serif',
],
monospace: ['Consolas', '"Liberation Mono"', 'Menlo', 'monospace'],
},
fontSize: {
base: 15,
text: 16,
small: 13,
h1: 48,
h2: 36,
h3: 24,
h4: 18,
h5: 16,
h6: 16,
},
},
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.jsx');
return `import { ${name} } from 'Components/${name}';`;
},
};