Documentation
¶
Index ¶
- Variables
- type Spinner
- type SpinnerModel
- func (m SpinnerModel) Err() error
- func (m SpinnerModel) Init() tea.Cmd
- func (s *SpinnerModel) Spin() error
- func (m SpinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m SpinnerModel) View() string
- func (m SpinnerModel) WithSpinner(s Spinner) SpinnerModel
- func (m SpinnerModel) WithSpinnerStyle(s lipgloss.Style) SpinnerModel
- func (m SpinnerModel) WithStyle(s SpinnerStyle) SpinnerModel
- type SpinnerStyle
- type SpinnerTask
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type SpinnerModel ¶
type SpinnerModel struct {
// contains filtered or unexported fields
}
Bubbletea model of the spinner, wraps spinner.Model and contains the task to execute
func NewSpinner ¶
func NewSpinner(title string, task SpinnerTask) SpinnerModel
Create a new SpinnerModel.
func (SpinnerModel) Err ¶
func (m SpinnerModel) Err() error
func (SpinnerModel) View ¶
func (m SpinnerModel) View() string
func (SpinnerModel) WithSpinner ¶
func (m SpinnerModel) WithSpinner(s Spinner) SpinnerModel
Specify the spinner of the SpinnerModel.
s := espinner.NewSpinner(...).WithSpinner(spinner.Dot)
func (SpinnerModel) WithSpinnerStyle ¶
func (m SpinnerModel) WithSpinnerStyle(s lipgloss.Style) SpinnerModel
Specify the spinner style of the SpinnerModel.
s := espinner.NewSpinner(...).WithStyle(etable.SpinnerStyleDefault)
func (SpinnerModel) WithStyle ¶
func (m SpinnerModel) WithStyle(s SpinnerStyle) SpinnerModel
Specify the style of the SpinnerModel.
s := espinner.NewSpinner(...).WithStyle(etable.SpinnerStyleDefault)
type SpinnerStyle ¶
type SpinnerStyle struct {
ProgressStyle lipgloss.Style
SuccessStyle lipgloss.Style
FailureStyle lipgloss.Style
}
Spinner style definition
type SpinnerTask ¶
type SpinnerTask = func() error
Click to show internal directories.
Click to hide internal directories.