Skip to content

Commit

Permalink
fix(core): fix dialog header type (#2559)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored Sep 2, 2022
1 parent 74ecbd8 commit 36d0aa4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion projects/core/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TuiDialogComponent<O, I> {
}

@HostBinding(`class._centered`)
get header(): PolymorpheusContent {
get header(): PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, O>> {
return this.context.header;
}

Expand Down
3 changes: 1 addition & 2 deletions projects/core/components/dialog/dialog.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
*ngIf="header"
class="t-header"
>
<!-- TODO: Polymorpheus fix type -->
<ng-container *polymorpheusOutlet="$any(header) as text; context: context">
<ng-container *polymorpheusOutlet="header as text; context: context">
{{ text }}
</ng-container>
</header>
Expand Down
3 changes: 2 additions & 1 deletion projects/core/interfaces/dialog-options.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {TuiDialog} from '@taiga-ui/cdk';
import {TuiDialogSize} from '@taiga-ui/core/types';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';

Expand All @@ -18,6 +19,6 @@ export interface TuiDialogOptions<I> {
readonly closeable: boolean;
readonly dismissible: boolean;
readonly label: string;
readonly header: PolymorpheusContent;
readonly header: PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, any>>;
readonly data: I;
}

0 comments on commit 36d0aa4

Please sign in to comment.