diff --git a/apps/website/content/docs/chat/api/api-docs.json b/apps/website/content/docs/chat/api/api-docs.json index 1b0201a4..324d4f9c 100644 --- a/apps/website/content/docs/chat/api/api-docs.json +++ b/apps/website/content/docs/chat/api/api-docs.json @@ -3414,12 +3414,12 @@ { "name": "ChatSidenavScrimComponent", "kind": "class", - "description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n \n ", + "description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n \n ", "params": [], "examples": [], "properties": [ { - "name": "close", + "name": "dismiss", "type": "OutputEmitterRef", "description": "Fires when the user clicks the backdrop.", "optional": false diff --git a/examples/chat/angular/src/app/shell/demo-shell.component.html b/examples/chat/angular/src/app/shell/demo-shell.component.html index e8402678..f54650af 100644 --- a/examples/chat/angular/src/app/shell/demo-shell.component.html +++ b/examples/chat/angular/src/app/shell/demo-shell.component.html @@ -60,7 +60,7 @@ { expect(btn.getAttribute('aria-label')).toBe('Close conversations'); }); - it('emits (close) on click', () => { + it('emits (dismiss) on click', () => { fx.componentRef.setInput('open', true); fx.detectChanges(); - let closed = false; - fx.componentInstance.close.subscribe(() => { closed = true; }); + let dismissed = false; + fx.componentInstance.dismiss.subscribe(() => { dismissed = true; }); const btn = fx.nativeElement.querySelector('button.chat-sidenav-scrim__button') as HTMLButtonElement; btn.click(); - expect(closed).toBe(true); + expect(dismissed).toBe(true); }); }); diff --git a/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts b/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts index 41d107f0..33feaeb3 100644 --- a/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts +++ b/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts @@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core * and the drawer host (escapes the drawer host's stacking context). * * Usage: - * + * * */ @Component({ @@ -21,7 +21,7 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core type="button" class="chat-sidenav-scrim__button" aria-label="Close conversations" - (click)="close.emit()" + (click)="dismiss.emit()" > } `, @@ -44,5 +44,5 @@ export class ChatSidenavScrimComponent { /** When true, render the backdrop button covering the viewport. */ readonly open = input(false); /** Fires when the user clicks the backdrop. */ - readonly close = output(); + readonly dismiss = output(); }