forked from react-dropzone/react-dropzone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
94 lines (93 loc) · 2.42 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
/* eslint import/no-extraneous-dependencies: 0 */
const path = require('path')
const { createConfig, babel, css, devServer } = require('webpack-blocks')
// https://react-styleguidist.js.org/docs/configuration.html
module.exports = {
title: 'react-dropzone',
styleguideDir: path.join(__dirname, 'styleguide'),
template: {
favicon: 'https://github.com/react-dropzone/react-dropzone/raw/master/logo/logo.png'
},
webpackConfig: createConfig([babel(), css(), devServer({
disableHostCheck: true,
host: '0.0.0.0',
})]),
exampleMode: 'expand',
usageMode: 'expand',
showSidebar: true,
serverPort: 8080,
moduleAliases: {
'react-dropzone': path.resolve(__dirname, './src'),
'doka': path.resolve(__dirname, './vendor/doka/doka.esm.min.js')
},
require: [
path.join(__dirname, 'examples/theme.css'),
path.join(__dirname, 'vendor/doka/doka.min.css'),
],
sections: [
{
name: '',
content: 'README.md'
},
// TODO: Figure out how to document the hook
// See https://github.com/reactjs/react-docgen/issues/332
{
name: 'Components',
components: './src/index.js'
},
{
name: 'Examples',
sections: [
{
name: 'Basic example',
content: 'examples/basic/README.md'
},
{
name: 'Event Propagation',
content: 'examples/events/README.md'
},
{
name: 'Styling Dropzone',
content: 'examples/styling/README.md'
},
{
name: 'Accepting specific file types',
content: 'examples/accept/README.md'
},
{
name: 'Accepting specific number of files',
content: 'examples/maxFiles/README.md'
},
{
name: 'Custom validation',
content: 'examples/validator/README.md'
},
{
name: 'Opening File Dialog Programmatically',
content: 'examples/file-dialog/README.md'
},
{
name: 'Previews',
content: 'examples/previews/README.md'
},
{
name: 'Class Components',
content: 'examples/class-component/README.md'
},
{
name: 'Extending Dropzone',
content: 'examples/plugins/README.md'
}
]
},
{
name: 'Integrations',
sections: [
{
name: 'Doka',
content: 'examples/doka/README.md'
}
]
}
]
}