Skip to content

Commit 7b112ed

Browse files
committed
fix: dialog initial state
1 parent f820d74 commit 7b112ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/runtime/components/app/AppDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const dialog = useDialog()
2828
</v-btn>
2929

3030
<v-btn
31-
:color="dialog.action.buttonColor"
31+
:color="dialog.action.buttonColor || 'secondary'"
3232
variant="flat"
3333
@click="dialog.action.function"
3434
>

src/runtime/composables/dialog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface Dialog {
66
title: string
77
message: string
88
action: {
9-
function: (() => Promise<void>) | null
9+
function: (() => Promise<void>) | (() => void) | null
1010
buttonText: string
1111
buttonColor: string
1212
}
@@ -19,7 +19,7 @@ export const dialogInitialState: Dialog = {
1919
message: '',
2020
action: {
2121
function: null,
22-
buttonText: '',
22+
buttonText: 'Confirm',
2323
buttonColor: '',
2424
},
2525
closeButtonText: 'Cancel',

0 commit comments

Comments
 (0)