-
Notifications
You must be signed in to change notification settings - Fork 0
/
typeahead.go
63 lines (60 loc) · 1.42 KB
/
typeahead.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package menutoggle
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type Typeahead struct {
app.Compo
}
func (c *Typeahead) Render() app.UI {
return app.Div().
Class("pf-c-menu-toggle pf-m-typeahead pf-m-full-width").
Body(
app.Div().
Class("pf-c-text-input-group pf-m-plain").
Body(
app.Div().
Class("pf-c-text-input-group__main").
Body(
app.Span().
Class("pf-c-text-input-group__text").
Body(
app.Input().
Class("pf-c-text-input-group__text-input").
Type("text").
Value(true).
Aria("label", "Type to filter"),
),
),
app.Div().
Class("pf-c-text-input-group__utilities").
Body(
app.Button().
Class("pf-c-button pf-m-plain").
Type("button").
Aria("label", "Clear input").
Body(
app.I().
Class("fas fa-times fa-fw").
Aria("hidden", true),
),
),
),
app.Button().
Class("pf-c-menu-toggle__button").
Type("button").
Aria("expanded", "false").
ID("typeahead-example-toggle-button").
Aria("label", "Menu toggle").
Body(
app.Span().
Class("pf-c-menu-toggle__controls").
Body(
app.Span().
Class("pf-c-menu-toggle__toggle-icon").
Body(
app.I().
Class("fas fa-caret-down").
Aria("hidden", true),
),
),
),
)
}