Skip to content

Commit

Permalink
bring back in-element and render the tooltip attached to the applicat…
Browse files Browse the repository at this point in the history
…ion node.
  • Loading branch information
stopfstedt committed Jan 16, 2025
1 parent eb86eea commit 6707215
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
30 changes: 16 additions & 14 deletions packages/ilios-common/addon/components/ilios-tooltip.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<div
class="ilios-tooltip"
{{popper-tooltip @target}}
...attributes
>
<div class="content">
<div class="arrow" data-popper-arrow></div>
{{#if @title}}
<div class="title">
{{@title}}
{{#in-element this.applicationElement insertBefore=null}}
<div
class="ilios-tooltip"
{{popper-tooltip @target}}
...attributes
>
<div class="content">
<div class="arrow" data-popper-arrow></div>
{{#if @title}}
<div class="title">
{{@title}}
</div>
{{/if}}
<div class="body">
{{yield}}
</div>
{{/if}}
<div class="body">
{{yield}}
</div>
</div>
</div>
{{/in-element}}
7 changes: 7 additions & 0 deletions packages/ilios-common/addon/components/ilios-tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '@glimmer/component';

export default class TooltipComponent extends Component {
get applicationElement() {
return document.querySelector('.ember-application');
}
}

0 comments on commit 6707215

Please sign in to comment.