ui

package
v0.0.1-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ThemeBootstrap4 = "bootstrap4"
View Source
const ThemeYelak = "yelakUI"

ThemeYelak todo new theme coming soon

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control struct {
	ID          string
	ControlID   int
	ControlType string
	TheType     string
	Class       string

	Label       string
	Name        string
	Placeholder string
	Note        string

	Prepend string
	Append  string

	Fluid     bool
	Disabled  bool
	Required  bool
	Checked   bool
	MaxLength int

	GroupValues []GroupValue
	Values      []ControlValue
	Value       string
	EmptyValue  string
	Text        string
	TabsList    TabsList
}

type ControlValue

type ControlValue struct {
	Name     string
	Value    string
	IsActive bool
}

type Controls

type Controls struct {
	Data        []*Control
	DataButtons []*Control
}

func (*Controls) Button

func (f *Controls) Button(text string, name string, value string, class string) *Control
func (f *Controls) ButtonLink(text string, valueLink string, class string) *Control

func (*Controls) Checkbox

func (f *Controls) Checkbox(label string, name string, value string, checked bool) *Control

func (*Controls) Checkboxes

func (f *Controls) Checkboxes(label string, values []ControlValue) *Control

func (*Controls) HiddenInput

func (f *Controls) HiddenInput(name string, value string) *Control

func (*Controls) Hr

func (f *Controls) Hr()

func (*Controls) Image

func (f *Controls) Image(label string, name string, imageValue string, emptyValue string) *Control

func (*Controls) ImageGallery

func (f *Controls) ImageGallery(label string, name string, value string) *Control

func (*Controls) Input

func (f *Controls) Input(label string, name string, value string) *Control

func (*Controls) MarkDown

func (f *Controls) MarkDown(label string, name string, value string) *Control

func (*Controls) ResponsiveArea

func (f *Controls) ResponsiveArea(label string, name string, value string) *Control

func (*Controls) Select

func (f *Controls) Select(label string, name string, values []ControlValue) *Control

func (*Controls) Select2

func (f *Controls) Select2(label string, name string, values []ControlValue) *Control

func (*Controls) TabsList

func (f *Controls) TabsList(callFunc func(tabsList *TabsList)) *Control

func (*Controls) Tags

func (f *Controls) Tags(label string, name string, value string) *Control

func (*Controls) Test

func (f *Controls) Test(label string, name string, value string) *Control

func (*Controls) Textarea

func (f *Controls) Textarea(label string, name string, value string) *Control

type FormBuilder

type FormBuilder struct {
	Controls
	DataURL    string
	DataMethod string
	UseForm    bool
	Theme      string
	AssetsURL  string
	ControlID  int
}

func (*FormBuilder) Form

func (f *FormBuilder) Form(url string, method string)

func (*FormBuilder) Render

func (f *FormBuilder) Render() string

func (*FormBuilder) RenderElement

func (f *FormBuilder) RenderElement(control *Control) string

type GroupValue

type GroupValue struct {
	Name   string
	Values []ControlValue
}

type Tab

type Tab struct {
	Data []*Control
	Name string
	ID   int
}

type TabsList

type TabsList struct {
	Tabs []Tab
}

func (*TabsList) Tab

func (t *TabsList) Tab(name string, callFunc func(controls *Controls))

Jump to

Keyboard shortcuts

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