-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
89 lines (88 loc) · 1.99 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
const path = require('path');
module.exports = {
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.js');
return `import { ${name} } from '@comicrelief/component-library';`;
},
assetsDir: 'src/styleguide/assets/',
styleguideComponents: {
LogoRenderer: path.resolve(__dirname, './src/styleguide/CRLogo'),
Wrapper: path.join(__dirname, 'src/styleguide/ThemeWrapper')
},
skipComponentsWithoutExample: true,
ignore: [
'**/assets/**',
'**/data/**',
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/*.spec.{js,jsx,ts,tsx}',
'**/*.d.ts',
'**/*.style.{js,jsx,ts,tsx}',
'**/_*.{js,jsx,ts,tsx}' // don't add any underscore-prefixed (partial) components to the styleguide itself
],
// styleguideComponents: {
// StyleGuideRenderer: path.join(
// __dirname,
// 'src/styleguide/StyleGuideRenderer'
// )
// },
theme: {
color: {
sidebarBackground: '#29022c',
link: 'white',
linkHover: 'grey'
},
fontSize: {
base: 15,
text: 16,
small: 13,
h1: 24,
h2: 18,
h3: 16,
h4: 16,
h5: 16,
h6: 16
},
fontFamily: {
base: ['Montserrat']
},
maxWidth: '100%'
},
sections: [
{
name: 'Introduction',
content: './docs/introduction.md'
},
{
name: 'Installation',
content: './docs/installation.md'
},
{
name: 'Utils',
content: './docs/utils.md'
},
{
name: 'Theme',
content: './src/theme/crTheme/Colors.md'
},
{
name: 'Atoms',
components: 'src/components/Atoms/**/*.js',
sectionDepth: 2
},
{
name: 'Molecules',
components: 'src/components/Molecules/**/*.js',
sectionDepth: 2
},
{
name: 'Organisms',
components: 'src/components/Organisms/**/*.js',
sectionDepth: 2
}
// {
// name: 'Utilities',
// components: 'src/components/Utilities/**/*.js'
// }
]
};