Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
Tag string
Attr Attributes
// contains filtered or unexported fields
}
Base is the generic representation of all components.
func NewBase ¶
func NewBase(tag string, attr Attributes, children ...Component) *Base
NewBase returns an instance of Component with given values.
func (*Base) Build ¶
Build will set all base values for the Component, and then create the element for it.
func (*Base) GetElement ¶
GetElement returns the js.Value of the current
type Component ¶
type Component interface {
// Build builds the components
Build() Component
// GetElement returns current Component's element.
GetElement() js.Value
// SetFather sets the father of
// current Component
SetFather(Component) Component
// GetFather gets the father of
// current Component
GetFather() js.Value
// AddChildren adds a new Component as a chieldren
// to current Component.
AddChild(Component) Component
}
Component contains all base functions for a Component.
func NewButton ¶
func NewButton(attr Attributes, children ...Component) Component
NewButton returns an instance of Div with given attr
func NewDiv ¶
func NewDiv(attr Attributes, children ...Component) Component
NewDiv returns an instance of Div with given attr
Click to show internal directories.
Click to hide internal directories.