File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,13 +28,15 @@ const dialog = useDialog()
2828 </v-btn >
2929
3030 <v-btn
31- :color =" dialog.action.buttonColor || 'secondary'"
31+ :color =" dialog.action.button.color || 'secondary'"
3232 :loading =" dialog.action.loading"
3333 :disabled =" dialog.action.loading"
34+ :append-icon =" dialog.action.button.appendIcon"
35+ :prepend-icon =" dialog.action.button.prependIcon"
3436 variant =" flat"
3537 @click =" dialog.action.function"
3638 >
37- {{ dialog.action.buttonText }}
39+ {{ dialog.action.button.text }}
3840 </v-btn >
3941 </v-card-actions >
4042 </v-card >
Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ export interface Dialog {
66 title : string
77 message : string
88 action : {
9+ button : {
10+ color ?: string
11+ text : string
12+ prependIcon ?: string
13+ appendIcon ?: string
14+ }
915 function : ( ( ) => Promise < void > ) | ( ( ) => void ) | null
10- buttonText : string
11- buttonColor : string
12- loading : boolean
16+ loading ?: boolean
1317 }
1418 closeButtonText : string
1519}
@@ -19,9 +23,13 @@ export const dialogInitialState: Dialog = {
1923 title : '' ,
2024 message : '' ,
2125 action : {
26+ button : {
27+ color : '' ,
28+ text : 'Confirm' ,
29+ appendIcon : '' ,
30+ prependIcon : '' ,
31+ } ,
2232 function : null ,
23- buttonText : 'Confirm' ,
24- buttonColor : '' ,
2533 loading : false ,
2634 } ,
2735 closeButtonText : 'Cancel' ,
You can’t perform that action at this time.
0 commit comments