material

package
v0.0.0-...-d30aefb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindID

func FindID(moc vecty.MarkupOrChild) string

func MarkupColor

func MarkupColor(prefix string, color Color) vecty.Applyer

func MarkupOnly

func MarkupOnly(moc vecty.MarkupOrChild) *vecty.MarkupList

Types

type Alignment

type Alignment int
const (
	Left Alignment = iota
	Center
	Right
)

type Badge

type Badge struct {
	vecty.Core
	Text  string
	Color Color
	Pill  bool
	HRef  string
}

func (*Badge) Apply

func (c *Badge) Apply(h *vecty.HTML)

func (*Badge) Render

func (c *Badge) Render() vecty.ComponentOrHTML

type Button

type Button struct {
	vecty.Core
	Label      vecty.ComponentOrHTML
	Icon       vecty.ComponentOrHTML
	OnClick    func(this *Button, e *vecty.Event)
	Color      Color
	Size       ButtonSize
	DataTarget string
	DataToggle string
	Rounded    bool
	Link       bool
	Disabled   bool
	Mini       bool
	Markup     vecty.MarkupList
}

func (*Button) Apply

func (c *Button) Apply(h *vecty.HTML)

func (*Button) Render

func (c *Button) Render() vecty.ComponentOrHTML

type ButtonSize

type ButtonSize int
const (
	Regular ButtonSize = iota
	Small
	Large
)

type Card

type Card struct {
	vecty.Core
	Color         Color
	TextColor     Color
	TextAlignment Alignment
	Header        *CardHeader
	Body          vecty.ComponentOrHTML
	Footer        vecty.ComponentOrHTML
	Image         vecty.ComponentOrHTML
	ImageOverlay  vecty.ComponentOrHTML
}

func (*Card) Apply

func (c *Card) Apply(h *vecty.HTML)

func (*Card) Render

func (c *Card) Render() vecty.ComponentOrHTML

type CardHeader

type CardHeader struct {
	vecty.Core
	Color         Color
	Title         string
	SubTitle      string
	Icon          *Icon
	Text          string
	Custom        vecty.ComponentOrHTML
	TextAlignment Alignment
}

func (*CardHeader) Apply

func (c *CardHeader) Apply(h *vecty.HTML)

func (*CardHeader) Render

func (c *CardHeader) Render() vecty.ComponentOrHTML

type CardImage

type CardImage struct {
	vecty.Core
	Src    string
	Alt    string
	Bottom bool
}

func (*CardImage) Render

func (c *CardImage) Render() vecty.ComponentOrHTML

type Checkbox

type Checkbox struct {
	vecty.Core
	Root     vecty.MarkupOrChild
	Input    vecty.ComponentOrHTML
	Label    string
	Name     string
	Checked  bool
	Disabled bool
	Inline   bool
	Radio    bool
	Val      string
	Value    bind.Bind
}

FormField is a vecty-material formfield component.

func (*Checkbox) Apply

func (c *Checkbox) Apply(h *vecty.HTML)

func (*Checkbox) Render

func (c *Checkbox) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type Color

type Color int
const (
	Default Color = iota
	Primary
	Secondary
	Info
	Success
	Danger
	Warning
	Transparent
	Dark
	White
)

type DateTimePicker

type DateTimePicker struct {
	vecty.Core
	ID          string
	Placeholder string
	Value       bind.Bind
}

func (*DateTimePicker) Render

func (c *DateTimePicker) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type FormField

type FormField struct {
	vecty.Core
	Input    vecty.ComponentOrHTML
	Label    string
	Help     string
	AlignEnd bool
}

FormField is a vecty-material formfield component.

func (*FormField) Apply

func (f *FormField) Apply(h *vecty.HTML)

func (*FormField) Render

func (f *FormField) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type Icon

type Icon struct {
	vecty.Core
	Color Color
	Name  string
}

supported icons https://material.io/tools/icons/?style=baseline

func (*Icon) Render

func (c *Icon) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type InfoArea

type InfoArea struct {
	vecty.Core
	Icon       *Icon
	Horizontal bool
	Title      vecty.ComponentOrHTML
	Content    vecty.ComponentOrHTML
	Link       vecty.ComponentOrHTML
}

func (*InfoArea) Apply

func (c *InfoArea) Apply(h *vecty.HTML)

func (*InfoArea) Render

func (c *InfoArea) Render() vecty.ComponentOrHTML

type Input

type Input struct {
	vecty.Core
	ID          string
	Placeholder string
	Type        prop.InputType
	Value       bind.Bind
}

func (*Input) Render

func (c *Input) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type ModalDialog

type ModalDialog struct {
	vecty.Core
	ID         string
	Title      string
	Detail     string
	CancelText string
	AcceptText string
	Open       bool
	NoBackdrop bool
	Scrollable bool
	AcceptBtn  *Button
	CancelBtn  *Button
	OnAccept   func(this *ModalDialog, e *vecty.Event)
	OnCancel   func(this *ModalDialog, e *vecty.Event)
}

func (*ModalDialog) Render

func (c *ModalDialog) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

type Nav struct {
	vecty.Core
	//OnClick   func(this *Nav, e *vecty.Event)
	Style     NavStyle
	Alignment Alignment
	NavItems  NavItems
	Vertical  bool
	Href      string
}
func (b *Nav) Apply(h *vecty.HTML)
func (b *Nav) Render() vecty.ComponentOrHTML
type NavBar struct {
	vecty.Core
	OnClick       func(this *NavBar, e *vecty.Event)
	Color         Color
	LightColor    bool
	ColorOnScroll int
	Placement     NavBarPlacement
	Items         NavBarItems
	Brand         vecty.ComponentOrHTML
}
func (c *NavBar) Apply(h *vecty.HTML)
func (c *NavBar) Render() vecty.ComponentOrHTML
type NavBarItem struct {
	vecty.Core

	Name      string
	Active    bool
	Disabled  bool
	HRef      string
	IsVisible func(id string) bool
	OnClick   func(this *NavBarItem, e *vecty.Event)
	// contains filtered or unexported fields
}
func (b *NavBarItem) Apply(h *vecty.HTML)
func (b *NavBarItem) Render() vecty.ComponentOrHTML
type NavBarItems []NavBarItem
type NavBarPlacement int
const (
	NavBarPlacementDefault NavBarPlacement = iota
	NavBarPlacementFixedTop
	NavBarPlacementFixedBottom
	NavBarPlacementStickyTop
)
type NavItem struct {
	vecty.Core

	Name      string
	Active    bool
	Disabled  bool
	HRef      string
	IsVisible func(id string) bool
	OnClick   func(this *NavItem, e *vecty.Event)
	// contains filtered or unexported fields
}
func (b *NavItem) Apply(h *vecty.HTML)
func (b *NavItem) Render() vecty.ComponentOrHTML
type NavItems []NavItem
type NavStyle int
const (
	NavLink NavStyle = iota
	NavTabs
)

type Notification

type Notification struct {
	vecty.Core
	Title      bind.Bind
	Message    bind.Bind
	Icon       vecty.ComponentOrHTML
	Color      Color
	Size       ButtonSize
	DataTarget string
	DataToggle string
	Rounded    bool
	Link       bool
	Disabled   bool
	Mini       bool
	Markup     vecty.MarkupList
}

func (*Notification) Apply

func (c *Notification) Apply(h *vecty.HTML)

func (*Notification) Render

func (c *Notification) Render() vecty.ComponentOrHTML

type Select

type Select struct {
	vecty.Core
	Label   vecty.ComponentOrHTML
	OnClick func(this *Select, e *vecty.Event)
	Color   Color
	Markup  vecty.MarkupList
	Options []string
}

func (*Select) Apply

func (c *Select) Apply(h *vecty.HTML)

func (*Select) Render

func (c *Select) Render() vecty.ComponentOrHTML

type StaticComponent

type StaticComponent struct {
	vecty.Core
	Child vecty.ComponentOrHTML
}

func RenderStoredChild

func RenderStoredChild(child vecty.ComponentOrHTML) *StaticComponent

RenderStoredChild is a helper which provides a Component which wraps the provided ComponentOrHTML. It exists as a workaround to a vecty issue.

See: https://github.com/gopherjs/vecty/issues/191

func (*StaticComponent) Render

func (*StaticComponent) SkipRender

func (c *StaticComponent) SkipRender(prev vecty.Component) bool

type TextArea

type TextArea struct {
	vecty.Core
	ID          string
	Placeholder string
	Type        prop.InputType
	Value       bind.Bind
	Rows        int
	Cols        int
}

func (*TextArea) Render

func (c *TextArea) Render() vecty.ComponentOrHTML

Render implements the vecty.Component interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL