Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper is the top level struct for any vecty element. Don't create one of these structs directly. Instead, call the Wrap function to bring elements from the vecty world into the functy world
func Wrap ¶
func Wrap(fn func(...vecty.MarkupOrChild) *vecty.HTML) Wrapper
Wrap some standard vecty HTML so that you can manipulate it with functy builders. For example, here's how you'd build a <form>:
form := Wrap(elem.Form). // don't _call_ elem.Form() here!
Markup(vecty.Class("sample-form")). // add class="sample-form"
Child(elem.Input). // add an <input> element into this form
Markup(vecty.Class("edit")). // add class="edit"
Markup(prop.Value("edit something here!")). // value="edit something here!"
Event(event.Input(inputCallback)) // call the (go) function called inputCallback()
func (Wrapper) Apply ¶
Apply converts the wrapper into a vecty.HTML so you can use it in your "regularly scheduled" code
Click to show internal directories.
Click to hide internal directories.