todo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package todo provides an example of a basic Todo app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddView

type AddView struct {
	view.Embed

	OnAdd func(title string)
	// contains filtered or unexported fields
}

func NewAddView

func NewAddView() *AddView

func (*AddView) Build

func (v *AddView) Build(ctx view.Context) view.Model

type AppView

type AppView struct {
	view.Embed
	Todos []*Todo
}

func NewAppView

func NewAppView() *AppView

func (*AppView) Build

func (v *AppView) Build(ctx view.Context) view.Model

type Checkbox

type Checkbox struct {
	view.Embed
	Value         bool
	OnValueChange func(value bool)
}

func NewCheckbox

func NewCheckbox() *Checkbox

func (*Checkbox) Build

func (v *Checkbox) Build(ctx view.Context) view.Model

type DeleteButton

type DeleteButton struct {
	view.Embed
	OnPress func()
}

func NewDeleteButton

func NewDeleteButton() *DeleteButton

func (*DeleteButton) Build

func (v *DeleteButton) Build(ctx view.Context) view.Model

type Todo

type Todo struct {
	Title     string
	Completed bool
}

type TodoView

type TodoView struct {
	view.Embed
	Todo       *Todo
	OnDelete   func()
	OnComplete func(check bool)
}

func NewTodoView

func NewTodoView() *TodoView

func (*TodoView) Build

func (v *TodoView) Build(ctx view.Context) view.Model

Jump to

Keyboard shortcuts

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