-
Notifications
You must be signed in to change notification settings - Fork 0
/
dragfilehovercomponent.go
53 lines (50 loc) · 1.37 KB
/
dragfilehovercomponent.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
package fileupload
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type DragFileHoverComponent struct {
app.Compo
}
func (c *DragFileHoverComponent) Render() app.UI {
return app.Div().
Class("pf-c-file-upload pf-m-drag-hover").
Body(
app.Div().
Class("pf-c-file-upload__file-select").
Body(
app.Div().
Class("pf-c-input-group").
Body(
app.Input().
Class("pf-c-form-control").
ID("drag-file-hover-component-text-input").
Name("drag-file-hover-component-text-input").
Aria("label", "Drag and drop a file or upload one").
ReadOnly(true).
Placeholder("false").
Aria("describedby", "drag-file-hover-component-browse"),
app.Button().
Class("pf-c-button pf-m-control").
Type("button").
ID("drag-file-hover-component-browse").
Body(
app.Text("Upload"),
),
app.Button().
Class("pf-c-button pf-m-control").
Type("button").
Disabled(true).
Body(
app.Text("Clear"),
),
),
),
app.Div().
Class("pf-c-file-upload__file-details").
Body(
app.Textarea().
Class("pf-c-form-control pf-m-resize-vertical").
ID("drag-file-hover-component-file-details").
Name("drag-file-hover-component-file-details").
Aria("label", "Empty text area"),
),
)
}