diff --git a/projects/core/directives/hint/hint-unstyled.component.ts b/projects/core/directives/hint/hint-unstyled.component.ts index 91f82171375d..686a7aa5ea30 100644 --- a/projects/core/directives/hint/hint-unstyled.component.ts +++ b/projects/core/directives/hint/hint-unstyled.component.ts @@ -1,3 +1,4 @@ +import type {WritableSignal} from '@angular/core'; import { ChangeDetectionStrategy, Component, @@ -8,6 +9,7 @@ import { import type {TuiContext} from '@taiga-ui/cdk/types'; import {tuiParentAnimation} from '@taiga-ui/core/animations'; import type {TuiPortalItem} from '@taiga-ui/core/types'; +import type {PolymorpheusContent} from '@taiga-ui/polymorpheus'; import { injectContext, PolymorpheusComponent, @@ -19,13 +21,16 @@ import {TuiHintDirective} from './hint.directive'; @Component({ standalone: true, imports: [PolymorpheusOutlet], - template: '', + template: '', changeDetection: ChangeDetectionStrategy.OnPush, animations: [tuiParentAnimation], host: {'[@tuiParentAnimation]': ''}, }) export class TuiHintUnstyledComponent { - protected readonly context = injectContext>(); + protected readonly context = + injectContext< + TuiContext}> + >(); } @Directive({ diff --git a/projects/demo-playwright/tests/core/hint/hint.pw.spec.ts b/projects/demo-playwright/tests/core/hint/hint.pw.spec.ts index 86e73c907f50..a823c6ab0add 100644 --- a/projects/demo-playwright/tests/core/hint/hint.pw.spec.ts +++ b/projects/demo-playwright/tests/core/hint/hint.pw.spec.ts @@ -132,4 +132,13 @@ test.describe('TuiHint', () => { await expect(page).toHaveScreenshot('06-hint-direction__left.png'); }); + + test('TuiHint customizing works', async ({page}) => { + await tuiGoto(page, DemoRoute.Hint); + const example = new TuiDocumentationPagePO(page).getExample('#customizing'); + + await example.locator('tui-avatar').hover(); + + await expect(example).toHaveScreenshot('07-hint.png'); + }); }); diff --git a/projects/demo/src/modules/directives/hint/examples/2/index.html b/projects/demo/src/modules/directives/hint/examples/2/index.html index 97f896cc7e73..09cc8c4d9745 100644 --- a/projects/demo/src/modules/directives/hint/examples/2/index.html +++ b/projects/demo/src/modules/directives/hint/examples/2/index.html @@ -1,6 +1,7 @@