Skip to content

Commit

Permalink
refactor(dialog): custom class option.
Browse files Browse the repository at this point in the history
Change wrong comment. Remove unnecessary beforeEach from test.

angular#4718 angular#4012
  • Loading branch information
jbojcic1 committed May 24, 2017
1 parent 5944616 commit f456794
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/demo-app/dialog/dialog-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class DialogDemo {
actionsAlignment: string;
config: MdDialogConfig = {
disableClose: false,
panelClass: 'custom-dialog-class',
panelClass: 'custom-overlay-pane-class',
hasBackdrop: true,
backdropClass: '',
width: '',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/overlay/overlay-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class OverlayState {
/** Strategy to be used when handling scroll events while the overlay is open. */
scrollStrategy: ScrollStrategy = new NoopScrollStrategy();

/** Custom class to add to the dialog */
/** Custom class to add to the overlay pane. */
panelClass: string = '';

/** Whether the overlay has a backdrop. */
Expand Down
7 changes: 2 additions & 5 deletions src/lib/core/overlay/overlay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,8 @@ describe('Overlay', () => {

describe('panelClass', () => {
let config: OverlayState;

beforeEach(() => {
config = new OverlayState();
config.panelClass = 'custom-panel-class';
});
config = new OverlayState();
config.panelClass = 'custom-panel-class';

it('should apply a custom overlay pane class', () => {
let overlayRef = overlay.create(config);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dialog/dialog-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class MdDialogConfig {
/** The ARIA role of the dialog element. */
role?: DialogRole = 'dialog';

/** Custom class for the dialog, */
/** Custom class for the overlay pane. */
panelClass?: string = '';

/** Whether the dialog has a backdrop. */
Expand Down

0 comments on commit f456794

Please sign in to comment.