Skip to content Skip to sidebar Skip to footer

Showing A Gray Backdrop With A Mixin

I have a small window that I'm inserting into my page (and removing when the page is closed). I want a grayed-out background behind this window, as on dialogs. So I thought I'd use

Solution 1:

You need to call open of MyChild after append:

_doTap(e) {
   . . .
   this.$.placeholder.appendChild(this.mychild);
   this.mychild.open()
}

Then add withBackdrop property to true in MyChild component:

static get properties() {
     return {
         withBackdrop: {
          type: Boolean,
          value: true
        }
     }
}

Here you'll find working code.


Post a Comment for "Showing A Gray Backdrop With A Mixin"