@@ -3,39 +3,40 @@ import { storiesOf } from '@storybook/react'
3
3
import { action } from '@storybook/addon-actions'
4
4
5
5
import SideBarDecorator from './utils/SideBarDecorator'
6
+ import NewPage from '../src/containers/New/NewPage'
6
7
import TutorialList from '../src/containers/New/TutorialList'
7
8
import TutorialItem from '../src/containers/New/TutorialList/TutorialItem'
8
9
10
+ const tutorialList = [
11
+ {
12
+ id :'1' ,
13
+ version :{
14
+ summary :{
15
+ title :'Tutorial 1' ,
16
+ description :'The first one' ,
17
+ } ,
18
+ } ,
19
+ } ,
20
+ {
21
+ id :'2' ,
22
+ version :{
23
+ summary :{
24
+ title :'Tutorial 2' ,
25
+ description :'The second one' ,
26
+ } ,
27
+ } ,
28
+ } ,
29
+ ]
30
+
9
31
storiesOf ( 'New' , module )
10
32
. addDecorator ( SideBarDecorator )
33
+ . add ( 'New Page' , ( ) => {
34
+ return < NewPage tutorialList = { tutorialList } />
35
+ } )
11
36
. add ( 'Tutorial List' , ( ) => {
12
- const tutorialList = [
13
- {
14
- id :'1' ,
15
- version :{
16
- summary :{
17
- title :'Tutorial 1' ,
18
- description :'The first one' ,
19
- } ,
20
- } ,
21
- } ,
22
- {
23
- id :'2' ,
24
- version :{
25
- summary :{
26
- title :'Tutorial 2' ,
27
- description :'The second one' ,
28
- } ,
29
- } ,
30
- } ,
31
- ]
32
37
return < TutorialList tutorialList = { tutorialList } />
33
38
} )
34
39
. add ( 'Tutorial Item' , ( ) => {
35
- const tutorial = {
36
- id :'1' ,
37
- title :'Tutorial 1' ,
38
- description :'The first one' ,
39
- }
40
+ const tutorial = tutorialList [ 0 ]
40
41
return < TutorialItem onSelect = { action ( 'onSelect' ) } title = { tutorial . title } description = { tutorial . description } />
41
42
} )