Task/improve notification components type safety (#6305)
* feat(lib): improve type safety for notification components * feat(lib): replace constructor based injections with inject functions * feat(lib): destructure parameters * fix(lib): remove confirmLabel from AlertDialogParams interface * feat(lib): destructure parameters in alert and confirmation dialogspull/6284/head^2
parent
ed610ddd4e
commit
ddb859408b
@ -1,6 +1,5 @@
|
||||
export interface AlertDialogParams {
|
||||
confirmLabel?: string;
|
||||
discardLabel?: string;
|
||||
discardLabel: string;
|
||||
message?: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { ConfirmationDialogType } from '@ghostfolio/common/enums';
|
||||
|
||||
export interface ConfirmDialogParams {
|
||||
confirmLabel?: string;
|
||||
confirmLabel: string;
|
||||
confirmType: ConfirmationDialogType;
|
||||
discardLabel?: string;
|
||||
discardLabel: string;
|
||||
message?: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
export interface PromptDialogParams {
|
||||
confirmLabel: string;
|
||||
defaultValue?: string;
|
||||
discardLabel: string;
|
||||
title: string;
|
||||
valueLabel?: string;
|
||||
}
|
||||
Loading…
Reference in new issue