Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit083c057

Browse files
committed
cleanup storybook
1 parentb06049c commit083c057

File tree

4 files changed

+59
-118
lines changed

4 files changed

+59
-118
lines changed

‎web-app/stories/API.stories.tsx

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎web-app/stories/GitHubFetch.stories.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎web-app/stories/Overview.stories.tsx

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,69 @@
1+
import*asTTfrom'../../typings/tutorial'
12
import{linkTo}from'@storybook/addon-links'
23
import{action}from'@storybook/addon-actions'
34
import{storiesOf}from'@storybook/react'
45
importReactfrom'react'
5-
importOverViewPagefrom'../src/containers/Overview/OverviewPage'
6+
importOverViewPagefrom'../src/components/TutorialOverview'
67
importSideBarDecoratorfrom'./utils/SideBarDecorator'
78

89
storiesOf('Overview',module)
910
.addDecorator(SideBarDecorator)
1011
.add('OverView Page',()=>{
11-
constlevels=[
12-
{
13-
id:'L1',
14-
title:'The First Level',
15-
summary:'A Summary of the first level',
12+
consttutorial:TT.Tutorial={
13+
id:'1',
14+
version:'0.1.0',
15+
config:{
16+
testRunner:{command:''},
17+
repo:{uri:'',branch:'master'},
1618
},
17-
{
18-
id:'L2',
19-
title:'The Second Level',
20-
summary:'A Summary of the second level',
19+
summary:{
20+
title:'Manage NPM package.json',
21+
description:'Learn to use the package manager at the core of JavaScript projects.',
2122
},
22-
{
23-
id:'L3',
24-
title:'The Third Level',
25-
summary:'A Summary of the third level',
26-
},
27-
{
28-
id:'L4',
29-
title:'The Fourth Level',
30-
summary:'A Summary of the fourth level',
31-
},
32-
{
33-
id:'L5',
34-
title:'The Fifth Level',
35-
summary:'A Summary of the fifth level',
36-
},
37-
{
38-
id:'L6',
39-
title:'The Sixth Level',
40-
summary:'A Summary of the sixth level',
41-
},
42-
]
43-
return(
44-
<OverViewPage
45-
title="Manage NPM package.json"
46-
description="Learn to use the package manager at the core of JavaScript projects."
47-
createdBy={{name:'Shawn McKay'}}
48-
updatedAt={newDate().toUTCString()}
49-
levels={levels}
50-
onBack={action('back')}
51-
onNext={linkTo('Tutorial SideBar','Level')}
52-
/>
53-
)
23+
levels:[
24+
{
25+
id:'L1',
26+
title:'The First Level',
27+
summary:'A Summary of the first level',
28+
content:'',
29+
steps:[],
30+
},
31+
{
32+
id:'L2',
33+
title:'The Second Level',
34+
summary:'A Summary of the second level',
35+
content:'',
36+
steps:[],
37+
},
38+
{
39+
id:'L3',
40+
title:'The Third Level',
41+
summary:'A Summary of the third level',
42+
content:'',
43+
steps:[],
44+
},
45+
{
46+
id:'L4',
47+
title:'The Fourth Level',
48+
summary:'A Summary of the fourth level',
49+
content:'',
50+
steps:[],
51+
},
52+
{
53+
id:'L5',
54+
title:'The Fifth Level',
55+
summary:'A Summary of the fifth level',
56+
content:'',
57+
steps:[],
58+
},
59+
{
60+
id:'L6',
61+
title:'The Sixth Level',
62+
summary:'A Summary of the sixth level',
63+
content:'',
64+
steps:[],
65+
},
66+
],
67+
}
68+
return<OverViewPagetutorial={tutorial}onClear={action('clear')}onNext={linkTo('Tutorial SideBar','Level')}/>
5469
})

‎web-app/stories/SelectTutorial.stories.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import{action}from'@storybook/addon-actions'
22
import{storiesOf}from'@storybook/react'
33
importReactfrom'react'
4-
importSelectTutorialfrom'../src/containers/SelectTutorial/SelectTutorial'
5-
importTutorialItemfrom'../src/containers/SelectTutorial/TutorialItem'
4+
importSelectTutorialfrom'../src/containers/SelectTutorial'
65
importSideBarDecoratorfrom'./utils/SideBarDecorator'
76

87
consttutorialList=[
@@ -31,16 +30,5 @@ const tutorialList = [
3130
storiesOf('Select Tutorial',module)
3231
.addDecorator(SideBarDecorator)
3332
.add('Select Tutorial Page',()=>{
34-
return<SelectTutorialtutorialList={tutorialList}send={action('send')}/>
35-
})
36-
.add('Tutorial Item',()=>{
37-
consttutorial=tutorialList[0]
38-
return(
39-
<TutorialItem
40-
onSelect={action('onSelect')}
41-
title={tutorial.summary.title}
42-
description={tutorial.summary.description}
43-
createdBy={{name:'First Lastname'}}
44-
/>
45-
)
33+
return<SelectTutorialsend={action('send')}context={{}}/>
4634
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp