-
Notifications
You must be signed in to change notification settings - Fork 0
/
validated.go
49 lines (46 loc) · 1.01 KB
/
validated.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
package textarea
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type Validated struct {
app.Compo
}
func (c *Validated) Render() app.UI {
return app.Form().
NoValidate(true).
Class("pf-c-form").
Body(
app.Div().
Class("pf-c-form__group").
Body(
app.Div().
Class("pf-c-form__group-label").
Body(
app.Label().
Class("pf-c-form__label").
For("selection").
Body(
app.Span().
Class("pf-c-form__label-text").
Body(
app.Text("Comments:"),
),
),
),
app.Div().
Class("pf-c-form__group-control").
Body(
app.Textarea().
Class("pf-c-form-control").
Aria("invalid", "false").
Required(true).
Aria("label", "invalid text area example"),
app.Div().
Class("pf-c-form__helper-text").
ID("selection-helper").
Aria("live", "polite").
Body(
app.Text("Share your thoughts."),
),
),
),
)
}