From edcc6cf51d172a26eb20432fc49f6204bc9b5cbc Mon Sep 17 00:00:00 2001 From: splincode Date: Tue, 17 Dec 2024 18:20:09 +0300 Subject: [PATCH] fix(core): dialog has padding for close button event when not closeable --- projects/core/components/dialog/dialog.interfaces.ts | 3 +++ projects/core/components/dialog/dialog.style.less | 5 ++++- projects/core/components/dialog/dialog.template.html | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/core/components/dialog/dialog.interfaces.ts b/projects/core/components/dialog/dialog.interfaces.ts index d0a0692ac9de..909e044601b2 100644 --- a/projects/core/components/dialog/dialog.interfaces.ts +++ b/projects/core/components/dialog/dialog.interfaces.ts @@ -19,6 +19,9 @@ export type TuiDialogSize = TuiSizeL | TuiSizeS | 'auto' | 'fullscreen' | 'page' */ export interface TuiDialogOptions { readonly appearance: string; + /** + * TODO: rename to closable in v5.0 + */ readonly closeable: Observable | boolean; readonly data: I extends void ? undefined : I & {button?: string}; readonly dismissible: Observable | boolean; diff --git a/projects/core/components/dialog/dialog.style.less b/projects/core/components/dialog/dialog.style.less index db6e96e3d03b..4cbef349e3ae 100644 --- a/projects/core/components/dialog/dialog.style.less +++ b/projects/core/components/dialog/dialog.style.less @@ -97,10 +97,13 @@ .t-heading { margin: 0 0 0.5rem; - padding-inline-end: 2rem; overflow-wrap: break-word; font: var(--tui-font-heading-4); + &_closable { + padding-inline-end: 2rem; + } + &:empty { display: none; } diff --git a/projects/core/components/dialog/dialog.template.html b/projects/core/components/dialog/dialog.template.html index a6043da67126..375e46c14bcf 100644 --- a/projects/core/components/dialog/dialog.template.html +++ b/projects/core/components/dialog/dialog.template.html @@ -9,6 +9,7 @@