Skip to content

Conversation

@lchevalot
Copy link
Contributor

This is the improvement mentionned in #976.

This PR adds a progress bar under the Toast component when the progress variable is set to true like this : $this->*toastType*(progress: true)

When set to true, the progress bar will show up with the start value of 100, and decrease until 0 according to the duration of the toast, just like this :

image

Since the progress bar is the <progress> component from DaisyUI, we can use the progress classes to customize the it with the progressClass variable like this : $this->*toastType*(progressClass: 'progress-primary')

Note that progressClass is set to null by default, so the default color of the progress bar will be neutral.

I also was wondering if progress should actually be in the default behaviour of the toast and set to true by default instead of false. Tell me what you think about it.

(I'm aware that Livewire 4 is coming, making the merge of this PR delayed if validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant