BREAKING(overlays): make elevation prop setter param type number instead of string
This commit is contained in:
parent
683d5c1c9c
commit
b96dc40ebe
3 changed files with 9 additions and 4 deletions
5
.changeset/odd-suns-shake.md
Normal file
5
.changeset/odd-suns-shake.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/overlays': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
BREAKING: elevation property setter on OverlayController accepts numbers only, previously this was a number as a string. This syncs it with the getter which returns a number.
|
||||||
|
|
@ -416,14 +416,14 @@ export class OverlayController extends EventTargetShim {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} value
|
* @param {number} value
|
||||||
*/
|
*/
|
||||||
set elevation(value) {
|
set elevation(value) {
|
||||||
if (this.contentWrapperNode) {
|
if (this.contentWrapperNode) {
|
||||||
this.contentWrapperNode.style.zIndex = value;
|
this.contentWrapperNode.style.zIndex = `${value}`;
|
||||||
}
|
}
|
||||||
if (this.backdropNode) {
|
if (this.backdropNode) {
|
||||||
this.backdropNode.style.zIndex = value;
|
this.backdropNode.style.zIndex = `${value}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ export class OverlaysManager {
|
||||||
.reverse()
|
.reverse()
|
||||||
.forEach((ctrl, i) => {
|
.forEach((ctrl, i) => {
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
ctrl.elevation = `${i + 1}`;
|
ctrl.elevation = i + 1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue