component
Button
Primary and secondary actions. The primary button calls js.Alert.
Page code
// Page
<ui.Button label="Say hello" primary={ true } onclick={ ButtonClicked{} } />
<ui.Button label="Cancel" primary={ false } onclick={ nil } />
// Message and update
type ButtonClicked struct{}
case ButtonClicked:
return m, func() gothic.Msg {
js.Alert("Hello from Gothicbook")
return nil
}