@@ -11,37 +11,39 @@ export function buildCards() {
11
11
12
12
abc . card ( < Foo message = "yo" /> , 'here is a simple example' )
13
13
14
- demo . card (
15
- `## markdown doc
16
- you can use markdown for card documentation
17
- - foo
18
- - bar` ,
14
+ demo . card ( `
15
+ ## markdown doc
16
+ you can use markdown for card documentation
17
+ - foo
18
+ - bar
19
+ ` ,
19
20
< Foo message = "hello" />
20
21
)
21
22
22
23
demo . card ( < Foo message = "hello world" /> )
23
24
24
25
demo . card ( < Bar /> , { title : 'a bar card' } )
25
26
26
- demo . card (
27
- ` ## Counter
27
+ demo . card ( `
28
+ ## Counter
28
29
29
- This is a stateful counter. If you change the value prop
30
- in the source file it will not update because the new prop will be ignored
31
- and instead the component local state is rendered.
30
+ This is a stateful counter. If you change the value prop
31
+ in the source file it will not update because the new prop will be ignored
32
+ and instead the component local state is rendered.
32
33
33
- Implement *componentWillReceiveProps* and override the component local state
34
- if you want this to work as expected.` ,
34
+ Implement *componentWillReceiveProps* and override the component local state
35
+ if you want this to work as expected.
36
+ ` ,
35
37
36
38
< StatefulCounter value = { 42 } />
37
39
)
38
40
39
- demo . card (
40
- ` ## Stateless Counter
41
- This example shows how to manage state when you have a stateless
42
- component. The card can also dump the current state as JSON if
43
- you set the *inspect* flag to true.` ,
44
-
41
+ demo . card ( `
42
+ ## Stateless Counter
43
+ This example shows how to manage state when you have a stateless
44
+ component. The card can also dump the current state as JSON if
45
+ you set the *inspect* flag to true.
46
+ ` ,
45
47
( state ) =>
46
48
< StatelessCounter
47
49
value = { state . get ( ) }
@@ -53,10 +55,10 @@ export function buildCards() {
53
55
}
54
56
)
55
57
56
- demo . card (
57
- ` ## Undo/Redo
58
- Same example as before but with undo/redo controls added by the card.` ,
59
-
58
+ demo . card ( `
59
+ ## Undo/Redo
60
+ Same example as before but with undo/redo controls added by the card.
61
+ ` ,
60
62
( state ) =>
61
63
< StatelessCounter
62
64
value = { state . get ( ) }
@@ -68,11 +70,11 @@ export function buildCards() {
68
70
}
69
71
)
70
72
71
- demo . card (
72
- ` ## TodoList
73
- A simple todo list showing history and inspect feature
74
- with a little more interesting model than just a simple number.` ,
75
-
73
+ demo . card ( `
74
+ ## TodoList
75
+ A simple todo list showing history and inspect feature
76
+ with a little more interesting model than just a simple number.
77
+ ` ,
76
78
( state ) =>
77
79
< TodoList items = { state . get ( ) }
78
80
onSubmit = { ( text ) => state . update ( items => [ ...items , { text, done : false } ] ) }
@@ -89,17 +91,18 @@ export function buildCards() {
89
91
)
90
92
91
93
demo . markdown ( `
92
- # a markdown card
93
- this is a simple markdown card
94
- - lorem
95
- - ipsum
94
+ # a markdown card
95
+ this is a simple markdown card
96
+ - lorem
97
+ - ipsum
96
98
` )
97
99
98
100
demo . test ( testSimple , { title :'simple tests' } )
99
101
100
- demo . test (
101
- `## component tests
102
- Here you can see the results of some component tests.` ,
102
+ demo . test ( `
103
+ ## component tests
104
+ Here you can see the results of some component tests.
105
+ ` ,
103
106
testComponents
104
107
)
105
108
0 commit comments