feat!(progress): width now uses getters and setters

This commit is contained in:
Christian Rocha
2024-10-31 15:02:05 -04:00
parent e8ba813a88
commit 4b0f9c8282
3 changed files with 17 additions and 7 deletions
+2 -2
View File
@@ -195,14 +195,14 @@ func (m Model) tick(id, tag int) tea.Cmd {
// spinner := New(WithSpinner(Dot))
type Option func(*Model)
// WithSpinner is an option to set the spinner.
// WithSpinner is an option to set the spinner. Pass this to [Spinner.New].
func WithSpinner(spinner Spinner) Option {
return func(m *Model) {
m.Spinner = spinner
}
}
// WithStyle is an option to set the spinner style.
// WithStyle is an option to set the spinner style. Pass this to [Spinner.New].
func WithStyle(style lipgloss.Style) Option {
return func(m *Model) {
m.Style = style