forked from GetStream/stream-chat-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
129 lines (127 loc) · 3.96 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* eslint-disable */
// @noflow
/* eslint-env commonjs */
const path = require('path');
module.exports = {
title: 'React Chat - Docs',
styleguideDir: 'docs',
assetsDir: 'src/assets',
sortProps: (props) => props,
resolver: require('react-docgen').resolver.findAllComponentDefinitions,
webpackConfig: require('./webpack.config.styleguidist.js'),
serverPort: 6068,
styleguideComponents: {
PathlineRenderer: path.join(__dirname, 'styleguidist/PathlineRenderer'),
},
/* getExampleFilename(componentPath) {
componentPath = componentPath
.replace('src/components/', 'src/components/docs/')
.replace('.js', '.md');
console.log('componentPath', componentPath);
return componentPath;
}, */
sections: [
{
name: 'Top Level Components',
components: [
'src/components/Chat/Chat.js',
'src/components/Channel/Channel.js',
'src/components/ChannelList/ChannelList.js',
'src/components/MessageList/MessageList.js',
'src/components/ChannelHeader/ChannelHeader.js',
'src/components/Thread/Thread.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Message Components',
components: [
'src/components/Message/Message.js',
'src/components/Message/MessageSimple.js',
'src/components/Message/MessageTeam.js',
'src/components/Message/MessageLivestream.js',
'src/components/Attachment/Attachment.js',
'src/components/Attachment/AttachmentActions.js',
'src/components/Reactions/ReactionSelector.js',
'src/components/MessageActions/MessageActionsBox.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Message Input',
components: [
'src/components/MessageInput/MessageInput.js',
'src/components/MessageInput/MessageInputSmall.js',
'src/components/MessageInput/MessageInputLarge.js',
'src/components/MessageInput/MessageInputFlat.js',
'src/components/ChatAutoComplete/ChatAutoComplete.js',
'src/components/EditMessageForm/EditMessageForm.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Utilities',
components: [
'src/components/Card/Card.js',
'src/components/ChatDown/ChatDown.js',
'src/components/Loading/LoadingChannels.js',
'src/components/Avatar/Avatar.js',
'src/components/Loading/LoadingIndicator.js',
'src/components/Image/Image.js',
'src/components/DateSeparator/DateSeparator.js',
'src/components/Window/Window.js',
'src/components/ChannelList/ChannelListMessenger.js',
'src/components/ChannelList/ChannelListTeam.js',
'src/components/ChannelPreview/ChannelPreviewMessenger.js',
'src/components/ChannelPreview/ChannelPreviewCompact.js',
'src/components/ChannelPreview/ChannelPreviewLastMessage.js',
],
sections: [
{
name: 'Streami18n',
content: 'src/docs/Streami18n.md',
},
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Contexts',
sections: [
{
name: 'ChatContext',
content: 'src/docs/ChatContext.md',
},
{
name: 'withChatContext',
content: 'src/docs/withChatContext.md',
},
{
name: 'ChannelContext',
content: 'src/docs/ChannelContext.md',
},
{
name: 'withChannelContext',
content: 'src/docs/withChannelContext.md',
},
],
exampleMode: 'collapse',
usageMode: 'expand',
},
],
require: [
path.join(path.resolve(path.dirname('')), 'dist/css/index.css'),
path.join(path.resolve(path.dirname('')), 'styleguidist.css'),
],
template: {
favicon: 'https://getstream.imgix.net/images/favicons/favicon-96x96.png',
link: {
rel: 'stylesheet',
type: 'text/css',
href: './dist/css/index.css',
},
},
};