Skip to content

Commit

Permalink
fix(dialog): typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibing committed Sep 11, 2018
1 parent 38256bb commit 7a4efa7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ export const structure = [
source: [
'NbDialogService',
'NbDialogRef',
'NbDialogConfig',
],
},
{
Expand Down
1 change: 1 addition & 0 deletions src/framework/theme/components/dialog/dialog-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ export class NbDialogRef<T> {
this.overlayRef.detach();
this.overlayRef.dispose();
this.onClose$.next(res);
this.onClose$.complete();
}
}
4 changes: 2 additions & 2 deletions src/framework/theme/components/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down Expand Up @@ -123,7 +123,7 @@ export class NbDialogService {
/**
* Opens new instance of the dialog, may receive optional config.
* */
open<T>(content: Type<T> | TemplateRef<T>, userConfig: Partial<NbDialogConfig> = {}): NbDialogRef<T> {
open<T>(content: Type<T> | TemplateRef<T>, userConfig: Partial<NbDialogConfig<T>> = {}): NbDialogRef<T> {
const config = new NbDialogConfig({ ...this.globalConfig, ...userConfig });
const overlayRef = this.createOverlay(config);
const dialogRef = new NbDialogRef<T>(overlayRef);
Expand Down
5 changes: 5 additions & 0 deletions src/playground/dialog/dialog-result.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import { NbDialogRef, NbDialogService } from '@nebular/theme';
</nb-card-footer>
</nb-card>
`,
styles: [`
button {
margin: 1rem;
}
`],
})
export class NbDialogNamePromptComponent {
constructor(protected dialogRef: NbDialogRef<NbDialogNamePromptComponent>) {
Expand Down
2 changes: 1 addition & 1 deletion src/playground/dialog/dialog-showcase.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
});
}
Expand Down
8 changes: 5 additions & 3 deletions src/playground/dialog/dialog-template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import { NbDialogService } from '@nebular/theme';
</ng-template>
<button class="btn btn-primary" (click)="open(dialog)">Open Dialog</button>
`,
styles: [` /deep/ nb-layout-column {
height: 80vw;
} `],
styles: [`
/deep/ nb-layout-column {
height: 80vw;
}
`],
})
export class NbDialogTemplateComponent {
constructor(private dialogService: NbDialogService) {
Expand Down

0 comments on commit 7a4efa7

Please sign in to comment.