mirror of
https://github.com/status-im/whispervis.git
synced 2025-02-13 05:26:50 +00:00
Initial support for Update button
This commit is contained in:
parent
4772b0f10e
commit
664de3bf39
@ -1,9 +1,12 @@
|
|||||||
package widgets
|
package widgets
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/divan/graphx/layout"
|
"github.com/divan/graphx/layout"
|
||||||
"github.com/gopherjs/vecty"
|
"github.com/gopherjs/vecty"
|
||||||
"github.com/gopherjs/vecty/elem"
|
"github.com/gopherjs/vecty/elem"
|
||||||
|
"github.com/gopherjs/vecty/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ForceEditor struct {
|
type ForceEditor struct {
|
||||||
@ -25,6 +28,18 @@ func (l *ForceEditor) Render() vecty.ComponentOrHTML {
|
|||||||
),
|
),
|
||||||
vecty.List(l.inputs),
|
vecty.List(l.inputs),
|
||||||
),
|
),
|
||||||
|
elem.Div(
|
||||||
|
elem.Button(
|
||||||
|
vecty.Markup(
|
||||||
|
vecty.Class("pure-button"),
|
||||||
|
vecty.Style("background", "rgb(28, 184, 65)"),
|
||||||
|
vecty.Style("color", "white"),
|
||||||
|
vecty.Style("border-radius", "4px"),
|
||||||
|
event.Click(l.onUpdateClick),
|
||||||
|
),
|
||||||
|
vecty.Text("Update"),
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,3 +59,7 @@ func NewForceEditor() *ForceEditor {
|
|||||||
func (l *ForceEditor) Config() layout.Config {
|
func (l *ForceEditor) Config() layout.Config {
|
||||||
return l.config
|
return l.config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (l *ForceEditor) onUpdateClick(e *vecty.Event) {
|
||||||
|
fmt.Println("Clicked")
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user