forked from GetStream/react-activity-feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
98 lines (96 loc) · 2.31 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
95
96
97
98
// @noflow
/* globals __dirname */
/* eslint-env commonjs*/
const path = require('path');
const topLevelComponents = [
'FlatFeed',
'SinglePost',
'NotificationFeed',
'StatusUpdateForm',
'Activity',
'Notification',
];
const compositionComponents = [
'Flex',
'Panel',
'PanelHeader',
'PanelContent',
'PanelFooter',
'TimeHeader',
'DataLabel',
'Dropdown',
'DropdownPanel',
'ActivityHeader',
'ActivityContent',
'ActivityFooter',
];
module.exports = {
title: 'React Activity Feed - Docs',
styleguideDir: 'docs',
assetsDir: 'src/assets',
webpackConfig: require('./webpack.config.styleguidist.js'),
styleguideComponents: {
PathlineRenderer: path.join(
__dirname,
'src/styleguideComponents/PathlineRenderer.js',
),
},
sortProps: (props) => props,
sections: [
{
name: 'Introduction',
content: 'docs/setup.md',
},
{
name: 'Top Level Components',
// content: 'docs/top-level-components.md',
components: [
'src/Context/StreamApp.js',
...topLevelComponents.map(
(component) => `src/components/${component}.js`,
),
// 'src/components/SinglePost.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'UI Components',
// content: 'docs/other-components.md',
components: 'src/components/**/*.js',
ignore: [
...topLevelComponents.map((component) => `**/${component}.js`),
...compositionComponents.map((component) => `**/${component}.js`),
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Layout Components',
// content: 'docs/other-components.md',
components: [
...compositionComponents.map(
(component) => `src/components/${component}.js`,
),
],
exampleMode: 'collapse',
usageMode: 'expand',
},
// {
// name: 'Cookbook',
// content: 'docs/cookbook.md',
// },
],
template: {
favicon: 'https://getstream.imgix.net/images/favicons/favicon-96x96.png',
link: {
rel: 'stylesheet',
type: 'text/css',
href: './dist/index.css',
},
},
require: [
path.join(path.resolve(path.dirname('')), 'dist/index.css'),
path.join(path.resolve(path.dirname('')), 'src/styleguide-styles.css'),
],
};