-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
67 lines (66 loc) · 1.62 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
const path = require("path");
module.exports = {
title: "Component Style Guide",
sections: [
{
name: "Components",
components: "client/src/components/**/*.tsx",
componentDetect: (filePath) => {
return !filePath.endsWith("/index.ts");
},
ignore: [
"**/index.ts",
"**/tests/**/*.tsx", // Add this line to exclude all .tsx files in tests folders
],
},
{
name: "Utilities",
content: "client/src/utils/README.md",
ignore: [
"**/index.ts",
// Any other files or patterns to ignore
],
},
],
showSidebar: true,
theme: {
baseBackground: "#fdfdfc",
link: "#274e75",
linkHover: "#90a7bf",
border: "#e0d2de",
font: ["Helvetica", "sans-serif"],
},
styles: function styles(theme) {
return {
Playground: {
preview: {
paddingLeft: 0,
paddingRight: 0,
borderWidth: [[0, 0, 1, 0]],
borderRadius: 0,
},
},
Code: {
code: {
// make inline code example appear the same color as links
color: theme.color.link,
fontSize: 14,
},
},
};
},
webpackConfig: require("./client/webpack/webpack.common.js"),
propsParser: require("react-docgen-typescript").withCustomConfig("./tsconfig.json").parse,
require: [path.join(__dirname, "client/src/styles/styleguide-override.css")],
defaultExample: true,
template: {
head: {
links: [
{
rel: "stylesheet",
href: path.join(__dirname, "client/src/styles/styleguide-override.css"),
},
],
},
},
};