button

package
v0.0.0-...-b5b2f04 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Widget)

func OnClick

func OnClick(handler func(event mouse.ClickEvent)) Option

func WithStyle

func WithStyle(style widgets.Style) Option

WithStyle return an option that sets button widget style.

type Widget

type Widget struct {
	*widgets.PanicWidget
	render.Cache[*styles.Renderable[*renderable]]
}

Widget define a clickable widget button.

func New

func New(text string, options ...Option) *Widget

New returns a new button widget configured with the given options.

func (*Widget) Renderable

func (w *Widget) Renderable() render.Renderable

Jump to

Keyboard shortcuts

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