@@ -11,23 +11,10 @@ import (
1111)
1212
1313// Example is a wrapper for the examples
14- func Example (title string , mods ... gr.Modifier ) * gr.Element {
15-
16- links := el .Div (gr .CSS ("list-group" ),
17- exampleListItem (title , "basic" , "Basic" ),
18- exampleListItem (title , "basic-click-counter" , "Basic Click-counter" ),
19- exampleListItem (title , "composition" , "Component Composition" ),
20- exampleListItem (title , "lifecycle" , "Lifecycle" ),
21- exampleListItem (title , "interop" , "Interop" ),
22- exampleListItem (title , "ajax" , "Ajax" ),
23- exampleListItem (title , "router" , "React Router" ),
24- exampleListItem (title , "debounce" , "Debounced Mouse Events" ),
25- )
26-
14+ func Example (title string , body ... gr.Modifier ) * gr.Element {
15+ mods := gr .Modifiers (body )
2716 elem := el .Div (gr .CSS ("panel" , "panel-primary" ),
28- el .Div (gr .CSS ("panel-heading" ), el .Header1 (gr .Text (title ))),
29- el .Div (append (mods , gr .CSS ("panel-body" ),
30- el .Header3 (gr .Text ("More examples" )), links )... ),
17+ el .Div (gr .CSS ("panel-body" ), mods ),
3118 el .Div (gr .CSS ("panel-footer" ),
3219 el .Div (
3320 el .Emphasis (gr .Text ("Facebook React in Go: " )),
0 commit comments