package
Version:
v0.0.0-...-aecb3d9
Opens a new window with list of versions in this module.
Published: May 6, 2018
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Implementation of the material design button
usage
The material design button has the following properties:
Raised bool
Disabled bool
Hidden bool
Elevation int
example
import (
"github.com/microo8/golymer"
_ "github.com/microo8/golymer/elements/md-button"
)
var template := golymer.NewTemplate(`
<style>
--primary-color: #3F51B5;
</style>
<md-button elevation="2" on-click="ButtonClicked">click me!</md-button>
`)
type MyElem struct {
golymer.Element
}
func newMyElem() *MyElem {
e := new(MyElem)
e.SetTemplate(template)
return e
}
func (e *MyElem) ButtonClicked(event *golymer.Event) {
print("Button Clicked!")
}
func init() {
err := golymer.Define(newMyElem)
if err != nil {
panic(err)
}
}
Documentation
¶
MdButton implementation of material design button
NewMdButton creates new MDButton
ConnectedCallback adds click listener for the ripple effect
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.