-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
82 lines (80 loc) · 2.22 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
const path = require('path');
const webpackConfig = require('./webpack/dev.config.js');
webpackConfig.resolve = {
alias: {
'rsg-components/Wrapper': path.join(__dirname, 'src/Wrapper/index.js')
},
extensions: ['.js', '.jsx']
};
module.exports = {
title: 'Knife Roll',
showUsage: true,
context: {
// Add globals used in component examples here
},
require: [
// Load Fonts and styles for styleguide
path.resolve(__dirname, 'src/fonts/index.js'),
path.resolve(__dirname, 'src/styles/index.js'),
],
sections: [
{
name: 'Overview',
content: path.resolve(__dirname, 'src/Intro.md')
},
{
name: 'Grid System',
content: path.resolve(__dirname, 'src/grid/GridSystem.md'),
components: () => [
path.resolve(__dirname, 'src/grid/Grid.js'),
path.resolve(__dirname, 'src/grid/Row.js'),
path.resolve(__dirname, 'src/grid/Col.js'),
]
},
// {
// name: 'Fonts',
// content: path.resolve(__dirname, 'src/fonts/Fonts.md')
// },
// {
// name: 'Styles',
// content: path.resolve(__dirname, 'src/styles/Styles.md')
// },
// {
// name: 'Themes',
// content: path.resolve(__dirname, 'src/themes/Themes.md')
// },
{
name: 'Components',
content: path.resolve(__dirname, 'src/components/Components.md'),
components: () => [
path.resolve(__dirname, 'src/components/Button/Button.js'),
path.resolve(__dirname, 'src/components/Dialog/Dialog.js'),
path.resolve(__dirname, 'src/components/Input/Input.js'),
path.resolve(__dirname, 'src/components/Textarea/Textarea.js'),
path.resolve(__dirname, 'src/components/Checkbox/Checkbox.js'),
path.resolve(__dirname, 'src/components/Toggle/Toggle.js'),
],
},
],
styleguideDir: 'docs',
webpackConfig,
// Custom Styleguide Theme
theme: {
// fontFamily: {
// base: 'Helvetica'
// }
},
// Custom Styleguide styles
styles: {
// Logo: {
// logo: {
// fontFamily: 'Helvetica'
// }
// }
},
// Custom styleguide components
styleguideComponents: {
// Logo: path/to/LogoComponent,
// StyleGuideRenderer: path/to/StyleGuideRendererComponent
}
};