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

Commit8b5ad04

Browse files
committed
re-endable storybook level
1 parent0ba1e1c commit8b5ad04

File tree

4 files changed

+57
-135
lines changed

4 files changed

+57
-135
lines changed

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

Lines changed: 53 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,67 @@
11
importReactfrom'react'
2+
import*asGfrom'../../typings/graphql'
23

3-
import{object,withKnobs}from'@storybook/addon-knobs'
44
import{action}from'@storybook/addon-actions'
5-
import{linkTo}from'@storybook/addon-links'
5+
import{object,withKnobs}from'@storybook/addon-knobs'
66
import{storiesOf}from'@storybook/react'
77
importSideBarDecoratorfrom'./utils/SideBarDecorator'
88

9-
importapolloProviderfrom'./utils/ApolloDecorator'
10-
importLevelfrom'../src/containers/Tutorial/LevelPage/Level'
11-
importLevelSummaryPageContainer,{LevelSummaryPage}from'../src/containers/Tutorial/LevelPage'
9+
importLevelfrom'../src/containers/Tutorial/LevelPage/Level/index'
1210

1311
storiesOf('Tutorial SideBar',module)
1412
.addDecorator(SideBarDecorator)
1513
.addDecorator(withKnobs)
16-
.add('Level',()=>(
17-
<Level
18-
level={object('level',{
19-
id:'1',
20-
title:'Sum Level',
21-
text:'A description of this stage',
22-
stages:[
23-
{
24-
id:'1',
25-
title:'First',
26-
text:'some description',
27-
status:'COMPLETED',
14+
.add('Level',()=>{
15+
constlevel:G.Level={
16+
id:'L1',
17+
title:'A Title',
18+
description:'Some description',
19+
setup:null,
20+
status:'ACTIVE',
21+
steps:[
22+
{
23+
id:'L1:S1',
24+
title:'First Step',
25+
description:'First step description',
26+
setup:{
27+
id:'L1:S1:SETUP',
28+
commits:['abcdefg'],
2829
},
29-
{
30-
id:'2',
31-
title:'Second',
32-
text:'The second one',
33-
status:'ACTIVE',
30+
solution:{
31+
id:'L1:S1:SOLUTION',
32+
commits:['hijklmn'],
3433
},
35-
{
36-
id:'3',
37-
title:'Third',
38-
text:'The third one',
39-
status:'INCOMPLETE',
34+
status:'COMPLETE',
35+
},
36+
{
37+
id:'L1:S2',
38+
title:'Second Step',
39+
description:'Second step description',
40+
setup:{
41+
id:'L1:S2:SETUP',
42+
commits:['abcdefg'],
4043
},
41-
],
42-
})}
43-
onNext={linkTo('Tutorial SideBar','Stage')}
44-
onBack={linkTo('TUtorial SideBar','Summary')}
45-
/>
46-
))
47-
.add('Level Summary',()=>{
48-
return(
49-
<LevelSummaryPage
50-
send={action('send')}
51-
level={{
52-
id:'1',
53-
title:'Sum Level',
54-
text:'A description of this stage',
55-
stages:[
56-
{
57-
id:'1',
58-
title:'First',
59-
text:'some description',
60-
status:'COMPLETE',
61-
},
62-
{
63-
id:'2',
64-
title:'Second',
65-
text:'The second one',
66-
status:'ACTIVE',
67-
},
68-
{
69-
id:'3',
70-
title:'Third',
71-
text:'The third one',
72-
status:'INCOMPLETE',
73-
},
74-
],
75-
}}
76-
/>
77-
)
78-
})
79-
.addDecorator(apolloProvider)
80-
.add('Level Summary Container',()=>{
81-
return<LevelSummaryPageContainersend={action('send')}/>
44+
solution:{
45+
id:'L1:S2:SOLUTION',
46+
commits:['hijklmn'],
47+
},
48+
status:'ACTIVE',
49+
},
50+
{
51+
id:'L1:S3',
52+
title:'Third Step',
53+
description:'Third step description',
54+
setup:{
55+
id:'L1:S3:SETUP',
56+
commits:['abcdefg'],
57+
},
58+
solution:{
59+
id:'L1:S3:SOLUTION',
60+
commits:['hijklmn'],
61+
},
62+
status:'INCOMPLETE',
63+
},
64+
],
65+
}
66+
return<Levellevel={level}onContinue={action('onContinue')}onLoadSolution={action('onLoadSolution')}/>
8267
})

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

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

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

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

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { boolean, text, withKnobs } from '@storybook/addon-knobs'
44
import{storiesOf}from'@storybook/react'
55
importSideBarDecoratorfrom'./utils/SideBarDecorator'
66

7-
importStepfrom'../src/containers/Tutorial/StagePage/Stage/StepDescription'
7+
importStepfrom'../src/containers/Tutorial/LevelPage/Level/StepDescription'
88

99
conststepText=
1010
'This is a long paragraph of step text intended to wrap around the side after a short period of writing to demonstrate text wrap among other things'
@@ -32,5 +32,6 @@ const paragraphText = `Markdown included \`code\`, *bold*, & _italics_.
3232
storiesOf('Tutorial SideBar',module)
3333
.addDecorator(SideBarDecorator)
3434
.addDecorator(withKnobs)
35-
.add('Step',()=><Steptext={text('text',stepText)}hide={boolean('hide',false)}/>)
36-
.add('Step Markdown',()=><Steptext={text('text',paragraphText)}hide={boolean('hide',false)}/>)
35+
.add('Step',()=><div>Step</div>)
36+
// .add('Step', () => <Step text={text('text', stepText)} hide={boolean('hide', false)} />)
37+
// .add('Step Markdown', () => <Step text={text('text', paragraphText)} hide={boolean('hide', false)} />)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp