Skip to content

Commit

Permalink
refactor(mon-pix): simplify embed style about z-index
Browse files Browse the repository at this point in the history
Co-authored-by: Yann Bertrand <[email protected]>
Co-authored-by: Clément Latzarus <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent ebc5e0b commit d467461
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
4 changes: 0 additions & 4 deletions mon-pix/app/components/module/element/_embed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
}

.element-embed {
position: relative;

&__container {
position: relative;
}
Expand Down Expand Up @@ -32,12 +30,10 @@
}
}


&__overlay {
position: absolute;
top: 0;
left: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
Expand Down
18 changes: 9 additions & 9 deletions mon-pix/app/components/module/element/embed.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ export default class ModulixEmbed extends ModuleElement {
{{/if}}

<div class="element-embed__container">
<iframe
class="element-embed-container__iframe
{{unless this.isSimulatorLaunched 'element-embed-container__iframe--blurred'}}"
src={{@embed.url}}
title={{@embed.title}}
style={{this.heightStyle}}
{{didInsert this.setIframeHtmlElement}}
></iframe>

{{#unless this.isSimulatorLaunched}}
<div class="element-embed-container__overlay">
<PixButton
Expand All @@ -83,15 +92,6 @@ export default class ModulixEmbed extends ModuleElement {
</PixButton>
</div>
{{/unless}}

<iframe
class="element-embed-container__iframe
{{unless this.isSimulatorLaunched 'element-embed-container__iframe--blurred'}}"
src={{@embed.url}}
title={{@embed.title}}
style={{this.heightStyle}}
{{didInsert this.setIframeHtmlElement}}
></iframe>
</div>

{{#if this.isSimulatorLaunched}}
Expand Down

0 comments on commit d467461

Please sign in to comment.