antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
544 stars 39 forks source link

[w-button] Fix loading slot #117

Closed DerrikMilligan closed 11 months ago

DerrikMilligan commented 12 months ago

Currently the documentation notes the loading slot here for w-button but it doesn't work, even in the documentation.

Seems somewhere along the line we split the w-button across a couple files and the index.vue file.

This pull request adds a loading slot to the w-button/index.vue component and passes it along to the w-button/button.vue component.

There's one more potential consideration for a future pull request which is that in the w-button/button.vue component we wrap the loading slot with a div.w-button__loader which has very specific CSS in place to not resize the button and to center the spinner. However if you have some alternate text you'd like to display while it's disabled it will not resize the button correctly because of this class.

antoniandre commented 11 months ago

Thanks for the PR @DerrikMilligan indeed the slot has been lost in some refactoring I made lately :/ I'm glad you fixed it! I'm open for your next suggestion here, it sounds fair, show me more details if you decide to :)