components

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

templ: version: v0.2.707

templ: version: v0.2.707

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Button

func Button(config ButtonConfig) templ.Component

func ButtonDanger

func ButtonDanger(text string, icon any, hollow ...bool) templ.Component

func ButtonPrimary

func ButtonPrimary(text string, icon any, hollow ...bool) templ.Component

func ButtonSecondary

func ButtonSecondary(text string, icon any, hollow ...bool) templ.Component

func ButtonSuccess

func ButtonSuccess(text string, icon any, hollow ...bool) templ.Component

func ButtonWarning

func ButtonWarning(text string, icon any, hollow ...bool) templ.Component
func Header(lvel int, headingText, subText string, components ...templ.Component) templ.Component

func Heading

func Heading(level uint8, text string) templ.Component

func Heading1

func Heading1(text string) templ.Component

func Heading2

func Heading2(text string) templ.Component

func Heading3

func Heading3(text string) templ.Component

func Heading4

func Heading4(text string) templ.Component

func Heading5

func Heading5(text string) templ.Component

func Heading6

func Heading6(text string) templ.Component

func NewButton

func NewButton(text string, args ...interface{}) templ.Component

Types

type ButtonConfig

type ButtonConfig struct {
	Text string
	Icon templ.Component
	Type ButtonType
}

type ButtonType

type ButtonType uint8
const (
	ButtonTypePrimary ButtonType = 1 << iota
	ButtonTypeSecondary
	ButtonTypeSuccess
	ButtonTypeWarning
	ButtonTypeDanger
	ButtonTypeHollow
)

type ComponentList

type ComponentList[T Item] struct {
	// contains filtered or unexported fields
}

func (*ComponentList[T]) All

func (i *ComponentList[T]) All() []T

func (*ComponentList[T]) Append

func (i *ComponentList[T]) Append(item T)

func (*ComponentList[T]) Delete

func (i *ComponentList[T]) Delete(name string) (ok bool)

func (*ComponentList[T]) Get

func (i *ComponentList[T]) Get(name string) (T, bool)

type Item

type Item interface {
	Name() string
	Order() int
}

type Items

type Items[T Item] interface {
	All() []T
	Append(T)
	Get(name string) (T, bool)
	Delete(name string) (ok bool)
}

func NewItems

func NewItems[T Item]() Items[T]

Directories

Path Synopsis
templ: version: v0.2.707
templ: version: v0.2.707

Jump to

Keyboard shortcuts

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