|
| 1 | +import*asTTfrom'../../typings/tutorial' |
1 | 2 | import{linkTo}from'@storybook/addon-links' |
2 | 3 | import{action}from'@storybook/addon-actions' |
3 | 4 | import{storiesOf}from'@storybook/react' |
4 | 5 | importReactfrom'react' |
5 | | -importOverViewPagefrom'../src/containers/Overview/OverviewPage' |
| 6 | +importOverViewPagefrom'../src/components/TutorialOverview' |
6 | 7 | importSideBarDecoratorfrom'./utils/SideBarDecorator' |
7 | 8 |
|
8 | 9 | storiesOf('Overview',module) |
9 | 10 | .addDecorator(SideBarDecorator) |
10 | 11 | .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'}, |
16 | 18 | }, |
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.', |
21 | 22 | }, |
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')}/> |
54 | 69 | }) |