11import React from 'react'
22
33import { action } from '@storybook/addon-actions'
4- import { boolean , object , withKnobs } from '@storybook/addon-knobs'
4+ import { object , withKnobs } from '@storybook/addon-knobs'
55import { storiesOf } from '@storybook/react'
6- import demo from './data/basic'
76import SideBarDecorator from './utils/SideBarDecorator'
87
98import Stage from '../src/components/Stage'
@@ -13,44 +12,38 @@ storiesOf('Tutorial SideBar', module)
1312 . addDecorator ( withKnobs )
1413 . add ( 'Stage' , ( ) => (
1514 < 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' ,
1922 title : 'Sum' ,
2023 text : 'Write a function `sum` that adds two numbers together' ,
24+ status : 'COMPLETE' ,
2125 } ,
22- hints : [ ] ,
23- status : {
24- active : false ,
25- complete : true ,
26- } ,
27- } ,
28- step2Id : {
29- content : {
26+ {
27+ id : '2' ,
3028 title : 'Multiply' ,
3129 text : `Write a function \`multiply\` that multiplies two numbers together
3230
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' ,
3938 } ,
40- hints : [ ] ,
41- status : { active : true , complete : false } ,
42- } ,
43- step3Id : {
44- content : {
39+ {
40+ id : '3' ,
4541 title : 'Divide' ,
4642 text : 'Write a function `divide` that divides' ,
43+ status : 'INCOMPLETE' ,
4744 } ,
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+ } }
5447 onContinue = { action ( 'onContinue' ) }
5548 />
5649 ) )
0 commit comments