vuetifyjs / vuetify

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

[Feature Request] Style action buttons of v-confirm-edit #20704

Open septatrix opened 4 days ago

septatrix commented 4 days ago

Problem to solve

Currently one has no control over the style (e.g. variant) of the buttons of the v-confirm-edit component. The only solution currently is to create both buttons fully manually and use the save/cancel functions provided by the default slot.

Proposed solution

Expose props like button-variant et al on the confirm-edit element. Alternatively it would be great if options passed to the <component :is="actions" variant="... /* does not work */" /> would simply get picked up

MatthewAry commented 3 days ago

Good one! I do want to point out that the default slot also provides you with these props:

save: () => void
cancel: () => void
isPristine: boolean

properties. Which makes it so you wouldn't have to use the actions prop to create the buttons. Though according to the documentation, it doesn't indicate that isPristine is reactive, which I think would be necessary for determining if the button is disabled or not.

Here is an example: https://play.vuetifyjs.com/playgrounds/WWr9yA