Skip to content

Commit

Permalink
fix: use dialog slot naming
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Dec 3, 2024
1 parent eb29376 commit 3b209a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/vanilla/control-elements/media-error-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h2>Non existing mp4</h2>
></custom-video>
<img slot="poster" src="https://image.mux.com/Sc89iWAyNkhJ3P1rQ02nrEdCFTnfT01CZ2KmaEcxXfB008/thumbnail.webp?time=13" />
<media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
<media-error-dialog slot="top-layer"></media-error-dialog>
<media-error-dialog slot="dialog"></media-error-dialog>
<media-control-bar>
<media-play-button></media-play-button>
<media-mute-button></media-mute-button>
Expand Down
4 changes: 2 additions & 2 deletions src/js/media-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ template.innerHTML = /*html*/ `
display: none;
}
slot[name=top-layer]::slotted(*) {
slot[name=dialog]::slotted(*) {
z-index: 2;
}
Expand All @@ -220,7 +220,7 @@ template.innerHTML = /*html*/ `
${/* default, effectively "bottom-chrome" */ ''}
<slot part="bottom chrome"></slot>
</span>
<slot name="top-layer" part="layer top-layer"></slot>
<slot name="dialog" part="layer dialog-layer"></slot>
`;

const MEDIA_UI_ATTRIBUTE_NAMES = Object.values(MediaUIAttributes);
Expand Down

0 comments on commit 3b209a6

Please sign in to comment.