spinner

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(ctx context.Context, spinner *View) error

type EscPressedError

type EscPressedError struct{}

func (EscPressedError) Error

func (EscPressedError) Error() string

type Response

type Response struct {
	Error error
	// contains filtered or unexported fields
}

func (*Response) OnResponse

func (r *Response) OnResponse(msg bubbleviews.ResponseMessage) tea.Cmd

func (*Response) View

func (r *Response) View() bubbleviews.View

type View

type View struct {
	OnResponse func(response *Response) tea.Cmd

	ext.PrefixExt
	ext.SuffixExt
	// contains filtered or unexported fields
}

func New

func New(message string, action Action) *View

func (*View) AllowEscapeKey

func (m *View) AllowEscapeKey() bool

func (*View) Init

func (m *View) Init() tea.Cmd

func (*View) Message

func (m *View) Message() string

func (*View) MessageStyle

func (m *View) MessageStyle() lipgloss.Style

func (*View) SetAllowEscapeKey

func (m *View) SetAllowEscapeKey(b bool)

func (*View) SetMessage

func (m *View) SetMessage(s string)

func (*View) SetMessageStyle

func (m *View) SetMessageStyle(s lipgloss.Style)

func (*View) SetSpinnerStyle

func (m *View) SetSpinnerStyle(s lipgloss.Style)

func (*View) SetSpinnerType

func (m *View) SetSpinnerType(s spinner.Spinner)

func (*View) SpinnerStyle

func (m *View) SpinnerStyle() lipgloss.Style

func (*View) SpinnerType

func (m *View) SpinnerType() spinner.Spinner

func (*View) Update

func (m *View) Update(msg tea.Msg) tea.Cmd

func (*View) View

func (m *View) View() string

Jump to

Keyboard shortcuts

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