Skip to content

Commit fd53110

Browse files
committed
added static styleguide page
1 parent 546427d commit fd53110

File tree

6 files changed

+44
-7
lines changed

6 files changed

+44
-7
lines changed

docs/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>React & Redux in TypeScript - Static Typing Guide</title>
8+
</head>
9+
<body>
10+
<a href="/styleguide">Living Style Guide</a>
11+
</body>
12+
</html>

docs/styleguide/build/0.7272607c.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/styleguide/build/bundle.b342c5a9.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/styleguide/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Component Typing Patterns in React + TypeScript</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<script type="text/javascript" src="build/bundle.b342c5a9.js"></script></body>
11+
</html>

playground/docs/components.md

-1
This file was deleted.

playground/styleguide.config.js

+19-6
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,39 @@ const webpackConfig = createConfig([typescript()]);
66
webpackConfig.resolve.alias = { '@src': path.join(__dirname, 'src') };
77

88
module.exports = {
9-
showUsage: true,
10-
title: 'React-Redux-Typescript Guide',
9+
showUsage: false,
10+
styleguideDir: '../docs/styleguide',
11+
title: 'Component Typing Patterns in React + TypeScript',
1112
ignore: ['**/*.usage.tsx'],
1213
sections: [
1314
{
1415
name: 'Introduction',
1516
content: './docs/intro.md'
1617
},
1718
{
18-
name: 'Components',
19-
content: './docs/components.md',
19+
name: 'Stateless Components - SFC',
2020
components: () => ([
21-
'./src/components/sfc-spread-attributes.tsx',
2221
'./src/components/sfc-counter.tsx',
22+
'./src/components/sfc-spread-attributes.tsx',
23+
]),
24+
},
25+
{
26+
name: 'Stateful Components - Class',
27+
components: () => ([
2328
'./src/components/stateful-counter.tsx',
2429
'./src/components/stateful-counter-with-initial-count.tsx',
30+
]),
31+
},
32+
{
33+
name: 'Generic Components',
34+
components: () => ([
2535
'./src/components/generic-list.tsx'
2636
]),
27-
}
37+
},
2838
],
39+
theme: {
40+
sidebarWidth: 300,
41+
},
2942
propsParser: require('react-docgen-typescript').parse,
3043
webpackConfig: webpackConfig,
3144
updateExample: function (props, exampleFilePath) {

0 commit comments

Comments
 (0)