Skip to content

Commit 8480f19

Browse files
committed
example: Remove title and menu
1 parent cad40bf commit 8480f19

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

‎examples/helpers.go‎

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)