1
1
import React from 'react'
2
2
3
3
import { action } from '@storybook/addon-actions'
4
- import { boolean , object , withKnobs } from '@storybook/addon-knobs'
4
+ import { object , withKnobs } from '@storybook/addon-knobs'
5
5
import { storiesOf } from '@storybook/react'
6
- import demo from './data/basic'
7
6
import SideBarDecorator from './utils/SideBarDecorator'
8
7
9
8
import Stage from '../src/components/Stage'
@@ -13,44 +12,38 @@ storiesOf('Tutorial SideBar', module)
13
12
. addDecorator ( withKnobs )
14
13
. add ( 'Stage' , ( ) => (
15
14
< Stage
16
- steps = { object ( 'steps' , {
17
- step1Id : {
18
- content : {
15
+ stage = { {
16
+ id : '1' ,
17
+ title : 'Stage Title' ,
18
+ text : 'A description of the stage' ,
19
+ steps : [
20
+ {
21
+ id : '1' ,
19
22
title : 'Sum' ,
20
23
text : 'Write a function `sum` that adds two numbers together' ,
24
+ status : 'COMPLETE' ,
21
25
} ,
22
- hints : [ ] ,
23
- status : {
24
- active : false ,
25
- complete : true ,
26
- } ,
27
- } ,
28
- step2Id : {
29
- content : {
26
+ {
27
+ id : '2' ,
30
28
title : 'Multiply' ,
31
29
text : `Write a function \`multiply\` that multiplies two numbers together
32
30
33
- \`\`\`
34
- function someExample(a) {
35
- return a * 1
36
- }
37
- \`\`\`
38
- ` ,
31
+ \`\`\`
32
+ function someExample(a) {
33
+ return a * 1
34
+ }
35
+ \`\`\`
36
+ ` ,
37
+ status : 'ACTIVE' ,
39
38
} ,
40
- hints : [ ] ,
41
- status : { active : true , complete : false } ,
42
- } ,
43
- step3Id : {
44
- content : {
39
+ {
40
+ id : '3' ,
45
41
title : 'Divide' ,
46
42
text : 'Write a function `divide` that divides' ,
43
+ status : 'INCOMPLETE' ,
47
44
} ,
48
- hints : [ ] ,
49
- status : { active : false , complete : false } ,
50
- } ,
51
- } ) }
52
- stage = { object ( 'stage' , demo . data . stages . stage1Id ) }
53
- complete = { boolean ( 'complete' , false ) }
45
+ ] ,
46
+ } }
54
47
onContinue = { action ( 'onContinue' ) }
55
48
/>
56
49
) )
0 commit comments