statusmessage

package
v0.0.0-...-839ffb1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageType

type MessageType int
const (
	ErrorMessage MessageType = iota
	SuccessMessage
	WarningMessage
	InformationMessage
	NeutralMessage
)

type Widget

type Widget struct {
	orvyn.BaseWidget
	// contains filtered or unexported fields
}

Widget is a status message that can hold different type of message. Each message type have it's own style based on theme Status TextStyleID.

func New

func New() *Widget

New creates and returns a new status message *Widget.

func (*Widget) GetMinSize

func (w *Widget) GetMinSize() orvyn.Size

func (*Widget) GetPreferredSize

func (w *Widget) GetPreferredSize() orvyn.Size

func (*Widget) Init

func (w *Widget) Init() tea.Cmd

Init helps initializing the widget.

func (*Widget) Render

func (w *Widget) Render() string

func (*Widget) Reset

func (w *Widget) Reset()

Reset helps resetting the widget to it's default state.

func (*Widget) SetError

func (w *Widget) SetError(err error)

SetError helps defining an error message directly from an error.

func (*Widget) SetMessage

func (w *Widget) SetMessage(msg string, msgType MessageType)

SetMessage helps defining the message and the type of the message of the widget.

Jump to

Keyboard shortcuts

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