components

package
v0.0.0-...-0531a1b Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

templ: version: v0.2.778

templ: version: v0.2.778

templ: version: v0.2.778

templ: version: v0.2.778

Index

Constants

This section is empty.

Variables

View Source
var TodoViewModeStrings = []string{"All", "Active", "Completed"}

Functions

func Counter

func Counter(store CounterStore) templ.Component

func CounterButtons

func CounterButtons() templ.Component

func CounterCounts

func CounterCounts() templ.Component

func CounterInitial

func CounterInitial() templ.Component

func KVPairsAttrs

func KVPairsAttrs(kvPairs ...string) templ.Attributes

func SortableInitial

func SortableInitial() templ.Component

func TodoInput

func TodoInput(i int) templ.Component

func TodoRow

func TodoRow(mode TodoViewMode, todo *Todo, i int, isEditing bool) templ.Component

func TodosMVCView

func TodosMVCView(mvc *TodoMVC) templ.Component

Types

type CounterStore

type CounterStore struct {
	Global uint32 `json:"global"`
	User   uint32 `json:"user"`
}

type Todo

type Todo struct {
	Text      string `json:"text"`
	Completed bool   `json:"completed"`
}

type TodoMVC

type TodoMVC struct {
	Todos      []*Todo      `json:"todos"`
	EditingIdx int          `json:"editingIdx"`
	Mode       TodoViewMode `json:"mode"`
}

type TodoViewMode

type TodoViewMode int
const (
	TodoViewModeAll TodoViewMode = iota
	TodoViewModeActive
	TodoViewModeCompleted
	TodoViewModeLast
)

Jump to

Keyboard shortcuts

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