forked from Telsho/react-google-flight-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyleguide.config.js
78 lines (76 loc) · 1.74 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
const path = require('path');
const pkg = require('./package.json');
const webpackConfig = require('./config/webpack.js');
module.exports = {
title: `${pkg.name} v${pkg.version}`,
components: 'src/lib/components/**/[A-Z]*.js',
moduleAliases: {
[pkg.name]: path.resolve(__dirname, 'src/lib'),
},
// ribbon: {
// url: 'https://github.com/KaiHotz/react-rollup-boilerplate',
// text: 'Fork me on GitHub',
// },
showSidebar: true,
usageMode: 'expand',
skipComponentsWithoutExample: true,
template: {
head: {
links: [
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Roboto',
},
],
},
},
theme: {
color: {
link: '#065fd4',
linkHover: '#00adef',
},
font: ['Roboto', 'Helvetica', 'sans-serif'],
},
styles: {
StyleGuide: {
'@global body': {
fontFamily: 'Roboto',
},
},
Ribbon: {
root: {
backgroundImage: 'url("https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png")',
backgroundSize: '50px 50px',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'right top',
},
link: {
backgroundColor: '#065fd4',
},
},
Heading: {
heading2: {
fontSize: 26,
},
},
ReactComponent: {
root: {
marginBottom: 20,
},
header: {
marginBottom: 0,
},
tabs: {
marginBottom: 0,
},
},
},
webpackConfig,
getExampleFilename(componentPath) {
return componentPath.replace(/\.js?$/, '.examples.md');
},
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.js');
return `import { ${name} } from '${pkg.name}';`;
},
};