textbox

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultStyle = Style{
	Text: label.Style{
		Color: color.Black,
	},
	Bg: rect.Style{
		Color:   color.White,
		Padding: RectXY(4, 2),
		Basis:   Pct(100),
		Shrink:  Shrink(1),
		Grow:    Grow(1),
		Radius:  Px(5),
		Border: Border{
			Width: Px(1),
			Color: color.Black,
		},
	},
}
View Source
var InputErrorStyle = Style{
	Text: label.Style{
		Color: color.Black,
	},
	Bg: rect.Style{
		Color:   color.White,
		Padding: RectXY(4, 2),
		Basis:   Pct(100),
		Shrink:  Shrink(1),
		Grow:    Grow(1),
		Radius:  Px(5),
		Border: Border{
			Width: Px(1),
			Color: color.Red,
		},
	},
}

Functions

func New

func New(key string, props Props) node.T

Types

type Props

type Props struct {
	Style    Style
	Text     string
	OnChange func(string)
	OnBlur   func()
	OnAccept func()
	OnReject func()
}

type Style

type Style struct {
	Text label.Style
	Bg   rect.Style
}

Jump to

Keyboard shortcuts

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