Skip to content

Commit

Permalink
feat(modal): Add xl size for modal (#3239)
Browse files Browse the repository at this point in the history
First intent of this PR was made by @bastienmoulia via #2943
  • Loading branch information
IAfanasov authored and Benoit Charbonnier committed Jun 24, 2019
1 parent e682ee3 commit 998f358
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ <h4 class="modal-title">Modal title</h4>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openBackDropCustomClass(content)">Modal with backdrop custom class</button>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openSm(content)">Small modal</button>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openLg(content)">Large modal</button>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openXl(content)">Extra large modal</button>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openVerticallyCentered(content)">Modal vertically centered</button>
<button class="btn btn-outline-primary mb-2 mr-2" (click)="openScrollableContent(longContent)">Modal scrollable content</button>
2 changes: 2 additions & 0 deletions demo/src/app/components/modal/demos/options/modal-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export class NgbdModalOptions {
this.modalService.open(content, { size: 'lg' });
}

openXl(content) { this.modalService.open(content, {size: 'xl'}); }

openVerticallyCentered(content) {
this.modalService.open(content, { centered: true });
}
Expand Down
2 changes: 1 addition & 1 deletion misc/api-doc-test-cases/interface-with-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface NgbModalOptions {
/**
* Size of a new modal window.
*/
size?: 'sm' | 'lg';
size?: 'sm' | 'lg' | 'xl';
}
2 changes: 1 addition & 1 deletion misc/api-doc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('APIDocVisitor', () => {

expect(interfaceDocs.properties[2].name).toBe('size');
expect(interfaceDocs.properties[2].description).toBe('<p>Size of a new modal window.</p>');
expect(interfaceDocs.properties[2].type).toBe('"sm" | "lg"');
expect(interfaceDocs.properties[2].type).toBe('"sm" | "lg" | "xl"');
expect(interfaceDocs.properties[2].defaultValue).toBeUndefined();
});

Expand Down
2 changes: 1 addition & 1 deletion src/modal/modal-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface NgbModalOptions {
/**
* Size of a new modal window.
*/
size?: 'sm' | 'lg';
size?: 'sm' | 'lg' | 'xl';

/**
* A custom class to append to the modal window.
Expand Down

0 comments on commit 998f358

Please sign in to comment.