From 0076f657f22233c2b93799e228efe463865e312e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 4 Apr 2022 15:30:30 +0300 Subject: [PATCH] Fixed #2381 - ConfirmDialog: 'position' TypeScript errors --- .../confirmationoptions/ConfirmationOptions.d.ts | 8 ++++++++ src/views/confirmdialog/ConfirmDialogDoc.vue | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/components/confirmationoptions/ConfirmationOptions.d.ts b/src/components/confirmationoptions/ConfirmationOptions.d.ts index 307e47c2c..0d5b867f9 100644 --- a/src/components/confirmationoptions/ConfirmationOptions.d.ts +++ b/src/components/confirmationoptions/ConfirmationOptions.d.ts @@ -1,3 +1,5 @@ +type ConfirmationPositionType = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' | undefined; + export interface ConfirmationOptions { /** * Element to align the overlay. @@ -15,6 +17,12 @@ export interface ConfirmationOptions { * Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance. */ group?: string | undefined; + /** + * Position of the dialog, options are 'center', 'top', 'bottom', 'left', 'right', 'topleft', 'topright', 'bottomleft' or 'bottomright'. + * @see ConfirmationPositionType + * Default value is 'center'. + */ + position?: ConfirmationPositionType; /** * Icon to display next to the message. */ diff --git a/src/views/confirmdialog/ConfirmDialogDoc.vue b/src/views/confirmdialog/ConfirmDialogDoc.vue index f8a24f02e..fc981bfa4 100644 --- a/src/views/confirmdialog/ConfirmDialogDoc.vue +++ b/src/views/confirmdialog/ConfirmDialogDoc.vue @@ -139,6 +139,12 @@ export default { null Header text of the dialog. + + position + string + center + Position of the dialog, options are "center", "top", "bottom", "left", "right", "topleft", "topright", "bottomleft" or "bottomright". + accept Function