/
data.js
99 lines (92 loc) · 2.58 KB
/
data.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
import marked from 'marked';
export const docsData = {
categories: [
{
id: 'cat-1',
title: 'CAT 1',
},
{
id: 'cat-2',
title: 'CAT 2',
},
],
sections: [
{
id: 'basics',
heading: 'Basics',
items: [
{ id: 'getting-started', title: 'Getting Started' },
{ id: 'writing-stories', title: 'Writing Stories' },
{ id: 'build-as-a-static-app', title: 'Build as a Static App' },
],
},
{
id: 'guides',
heading: 'Guides',
items: [
{ id: 'getting-started', title: 'Getting Started' },
{ id: 'writing-stories', title: 'Writing Stories' },
{ id: 'build-as-a-static-app', title: 'Build as a Static App' },
],
},
{
id: 'configurations',
heading: 'Configuations',
items: [
{ id: 'default-config', title: 'Default Config' },
{ id: 'webpack', title: 'Webpack' },
{ id: 'babel', title: 'Babel' },
],
},
],
selectedItem: {
id: 'writing-stories',
section: 'basics',
title: 'Writing Stories',
content: marked(`
You need to write stories to show your components inside Storybook.<br/>
We've a set of APIs allows you to write stories and do more with them.
When you are writing stories, you can follow these guidelines<br/>
to write great stories.
* Write UI components by passing data via props.
* In this way, you can isolate UI components easilly.
* Do not write app-specific code inside your UI components.
~~~js
import { linkTo } from @storybook/addon-links
storiesOf('Toggle', module)
.add('on', () => {
return <Toggle value={true} onChange={linkTo('Toggle', 'off')} />
})
.add('off', () => {
return <Toggle value={false} onChange={linkTo('Toggle', 'on')} />
});
~~~
`),
},
featuredStorybooks: [
{
owner: 'https://avatars0.githubusercontent.com/u/698437?v=3&s=200',
storybook: {
name: 'React Dates',
link: 'http://airbnb.io/react-dates/',
},
source: 'https://github.com/airbnb/react-dates',
},
{
owner: 'https://avatars3.githubusercontent.com/u/239676?v=3&s=460',
storybook: {
name: 'React Native Web',
link: 'https://necolas.github.io/react-native-web/docs/',
},
source: 'https://github.com/necolas/react-native-web',
},
{
owner: 'https://avatars1.githubusercontent.com/u/15616844?v=3&s=200',
storybook: {
name: 'React Button',
link: 'http://kadira-samples.github.io/react-button/',
},
source: 'https://github.com/kadira-samples/react-button',
},
],
};