mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
feat(progress)!: model shouldn't conform to tea.Model
This commit is contained in:
@@ -204,16 +204,11 @@ func New(opts ...Option) Model {
|
|||||||
// Deprecated: use [New] instead.
|
// Deprecated: use [New] instead.
|
||||||
var NewModel = New
|
var NewModel = New
|
||||||
|
|
||||||
// Init exists to satisfy the tea.Model interface.
|
|
||||||
func (m Model) Init() tea.Cmd {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is used to animate the progress bar during transitions. Use
|
// Update is used to animate the progress bar during transitions. Use
|
||||||
// SetPercent to create the command you'll need to trigger the animation.
|
// SetPercent to create the command you'll need to trigger the animation.
|
||||||
//
|
//
|
||||||
// If you're rendering with ViewAs you won't need this.
|
// If you're rendering with ViewAs you won't need this.
|
||||||
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case FrameMsg:
|
case FrameMsg:
|
||||||
if msg.id != m.id || msg.tag != m.tag {
|
if msg.id != m.id || msg.tag != m.tag {
|
||||||
|
|||||||
Reference in New Issue
Block a user