From 7a4efa73324effb3fedb751e4ee9cccf738a69f1 Mon Sep 17 00:00:00 2001 From: Nikita Poltoratsky Date: Tue, 11 Sep 2018 13:58:17 +0300 Subject: [PATCH] fix(dialog): typos --- docs/structure.ts | 1 + src/framework/theme/components/dialog/dialog-ref.ts | 1 + src/framework/theme/components/dialog/dialog.service.ts | 4 ++-- src/playground/dialog/dialog-result.component.ts | 5 +++++ src/playground/dialog/dialog-showcase.component.ts | 2 +- src/playground/dialog/dialog-template.component.ts | 8 +++++--- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/structure.ts b/docs/structure.ts index a3831c67f5..2886430443 100644 --- a/docs/structure.ts +++ b/docs/structure.ts @@ -309,6 +309,7 @@ export const structure = [ source: [ 'NbDialogService', 'NbDialogRef', + 'NbDialogConfig', ], }, { diff --git a/src/framework/theme/components/dialog/dialog-ref.ts b/src/framework/theme/components/dialog/dialog-ref.ts index 897a4f0e82..4e06e74896 100644 --- a/src/framework/theme/components/dialog/dialog-ref.ts +++ b/src/framework/theme/components/dialog/dialog-ref.ts @@ -38,5 +38,6 @@ export class NbDialogRef { this.overlayRef.detach(); this.overlayRef.dispose(); this.onClose$.next(res); + this.onClose$.complete(); } } diff --git a/src/framework/theme/components/dialog/dialog.service.ts b/src/framework/theme/components/dialog/dialog.service.ts index d6cc3cb8b7..5a28190e44 100644 --- a/src/framework/theme/components/dialog/dialog.service.ts +++ b/src/framework/theme/components/dialog/dialog.service.ts @@ -71,7 +71,7 @@ import { NbDialogContainerComponent } from './dialog-container'; * * `context` - both, template and component may receive data through `config.context` property. * For components, this data will be assigned through inputs. - * For template, you can access it inside template as $implicit. + * For templates, you can access it inside template as $implicit. * * ```ts * this.dialogService.open(template, { context: 'pass data in template' }); @@ -123,7 +123,7 @@ export class NbDialogService { /** * Opens new instance of the dialog, may receive optional config. * */ - open(content: Type | TemplateRef, userConfig: Partial = {}): NbDialogRef { + open(content: Type | TemplateRef, userConfig: Partial> = {}): NbDialogRef { const config = new NbDialogConfig({ ...this.globalConfig, ...userConfig }); const overlayRef = this.createOverlay(config); const dialogRef = new NbDialogRef(overlayRef); diff --git a/src/playground/dialog/dialog-result.component.ts b/src/playground/dialog/dialog-result.component.ts index 16ac0eb159..12ded189ca 100644 --- a/src/playground/dialog/dialog-result.component.ts +++ b/src/playground/dialog/dialog-result.component.ts @@ -15,6 +15,11 @@ import { NbDialogRef, NbDialogService } from '@nebular/theme'; `, + styles: [` + button { + margin: 1rem; + } + `], }) export class NbDialogNamePromptComponent { constructor(protected dialogRef: NbDialogRef) { diff --git a/src/playground/dialog/dialog-showcase.component.ts b/src/playground/dialog/dialog-showcase.component.ts index 9a6e9b0d09..b5d07e91e9 100644 --- a/src/playground/dialog/dialog-showcase.component.ts +++ b/src/playground/dialog/dialog-showcase.component.ts @@ -17,7 +17,7 @@ export class NbDialogShowcaseComponent { open() { this.dialogService.open(NbDialogComponent, { context: { - title: 'This is title passed to the dialog component', + title: 'This is a title passed to the dialog component', }, }); } diff --git a/src/playground/dialog/dialog-template.component.ts b/src/playground/dialog/dialog-template.component.ts index 6e76e76093..c96d6a9a4e 100644 --- a/src/playground/dialog/dialog-template.component.ts +++ b/src/playground/dialog/dialog-template.component.ts @@ -16,9 +16,11 @@ import { NbDialogService } from '@nebular/theme'; `, - styles: [` /deep/ nb-layout-column { - height: 80vw; - } `], + styles: [` + /deep/ nb-layout-column { + height: 80vw; + } + `], }) export class NbDialogTemplateComponent { constructor(private dialogService: NbDialogService) {