refactor: warningClose
This commit is contained in:
parent
e9c15d4555
commit
792d62b0ea
2 changed files with 11 additions and 4 deletions
|
|
@ -44,6 +44,7 @@ export function dialogCheckData(opts: {
|
|||
export function dialogWarningClose(
|
||||
t: ComposerTranslation,
|
||||
opts: {
|
||||
message?: string;
|
||||
action?: (...args: unknown[]) => unknown;
|
||||
cancel?: (...args: unknown[]) => unknown;
|
||||
},
|
||||
|
|
@ -53,7 +54,7 @@ export function dialogWarningClose(
|
|||
icon: 'mdi-alert',
|
||||
title: t('form.warning.title'),
|
||||
actionText: t('dialog.action.ok'),
|
||||
message: t('dialog.message.warningClose'),
|
||||
message: opts.message || t('dialog.message.warningClose'),
|
||||
action: async () => {
|
||||
if (opts.action) opts.action();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue