vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.63k stars 6.95k forks source link

[Bug Report][3.6.11] v-btn's default slot stops icon from "icon" prop from showing even when slot is empty #20356

Open pedro-la-goncalves opened 3 weeks ago

pedro-la-goncalves commented 3 weeks ago

Environment

Vuetify Version: 3.6.11 Vue Version: 3.4.31 Browsers: Chrome 127.0.0.0 OS: Windows 10

Steps to reproduce

Expected Behavior

When the slot is not used, apply the desired icon and apply the icon button style

Actual Behavior

Button has icon button style but the desired icon does not show

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

I was able to work around it by using a v-if for when the icon prop has a valid value.

pedro-la-goncalves commented 3 weeks ago

It is also possible to use the "text" prop instead of the default slot in order to create a button component 👈

However, it feels like an slot that is not being used should not impact the component like this 🤔