Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 0c4ad17

Browse files
KarenParkerErinCoughlan
authored andcommitted
feat(panel): Add hasBackdrop config to the panel.
1 parent 5daa4b3 commit 0c4ad17

File tree

8 files changed

+316
-129
lines changed

8 files changed

+316
-129
lines changed

src/components/backdrop/backdrop.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// !!Important - Theme-based Background-color can be configured in backdrop-theme.scss
2-
// - Animate background-color opacityy only for `.md-opaque` styles
2+
// - Animate background-color opacity only for `.md-opaque` styles
33

44
md-backdrop {
55
transition: opacity 450ms;

src/components/panel/demoBasicUsage/script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ BasicDemoCtrl.prototype.showDialog = function() {
2929
controller: PanelDialogCtrl,
3030
controllerAs: 'ctrl',
3131
templateUrl: 'panel.tmpl.html',
32+
hasBackdrop: true,
3233
panelClass: 'demo-dialog-example',
3334
position: position,
3435
trapFocus: true,

src/components/panel/demoPanelAnimations/script.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ AnimationCtrl.prototype.showDialog = function() {
7979
panelClass: 'demo-dialog-example',
8080
position: position,
8181
trapFocus: true,
82-
zIndex: 150
82+
zIndex: 150,
83+
clickOutsideToClose: true,
84+
clickEscapeToClose: true,
85+
hasBackdrop: true,
8386
};
8487

8588
this._panelRef = this._mdPanel.open(config);

src/components/panel/panel-theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.md-panel {
2+
3+
background-color: '{{background-900-0.0}}';
4+
5+
&._md-panel-backdrop.md-THEME_NAME-theme {
6+
background-color: '{{background-900-1.0}}';
7+
}
8+
9+
}

0 commit comments

Comments
 (0)