-
Notifications
You must be signed in to change notification settings - Fork 0
/
indented.go
37 lines (34 loc) · 839 Bytes
/
indented.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
package expandablesection
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type Indented struct {
app.Compo
}
func (c *Indented) Render() app.UI {
return app.Div().
Class("pf-c-expandable-section pf-m-expanded pf-m-indented").
Body(
app.Button().
Type("button").
Class("pf-c-expandable-section__toggle").
Aria("expanded", true).
Body(
app.Span().
Class("pf-c-expandable-section__toggle-icon").
Body(
app.I().
Class("fas fa-angle-right").
Aria("hidden", true),
),
app.Span().
Class("pf-c-expandable-section__toggle-text").
Body(
app.Text("Show less"),
),
),
app.Div().
Class("pf-c-expandable-section__content").
Body(
app.Text("This content is visible only when the component is expanded."),
),
)
}