Skip to content

Commit

Permalink
fix(core): dialog has padding for close button event when not closeab…
Browse files Browse the repository at this point in the history
…le (#10012)
  • Loading branch information
splincode authored Dec 18, 2024
1 parent b5d328c commit 97d24ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions projects/core/components/dialog/dialog.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export type TuiDialogSize = TuiSizeL | TuiSizeS | 'auto' | 'fullscreen' | 'page'
*/
export interface TuiDialogOptions<I> {
readonly appearance: string;
/**
* TODO: rename to closable in v5.0
*/
readonly closeable: Observable<boolean> | boolean;
readonly data: I extends void ? undefined : I & {button?: string};
readonly dismissible: Observable<boolean> | boolean;
Expand Down
5 changes: 4 additions & 1 deletion projects/core/components/dialog/dialog.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions projects/core/components/dialog/dialog.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<div class="t-content">
<h2
class="t-heading"
[class.t-heading_closable]="context.closeable"
[id]="context.id"
[textContent]="context.label"
></h2>
Expand Down

0 comments on commit 97d24ad

Please sign in to comment.