Skip to content

Commit

Permalink
Possible soln 2: apply style using native js
Browse files Browse the repository at this point in the history
  • Loading branch information
kiannaquach committed Sep 13, 2023
1 parent f5b785e commit 5fa9b68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions ui/lib/core/addon/components/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export default Component.extend({
openTrigger: null,
height: 0,
focusTrigger: null,
style: computed('height', function () {
return `height: ${this.height}px`;
}),
wormholeReference: null,
wormholeId: computed('elementId', function () {
return `confirm-${this.elementId}`;
Expand All @@ -51,7 +48,7 @@ export default Component.extend({
const height = this.openTrigger
? this.element.querySelector('.confirm-overlay').clientHeight
: this.element.querySelector('.confirm').clientHeight;
this.set('height', height);
this.element.querySelector('.confirm-wrapper').style = `height: ${height}px;`;
},
actions: {
onTrigger: function (itemId, e) {
Expand Down
4 changes: 1 addition & 3 deletions ui/lib/core/addon/templates/components/confirm.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}

{{! template-lint-disable no-inline-styles}}

<div class="confirm-wrapper {{if this.openTrigger 'confirm-height'}}">
<div class="confirm-wrapper">
<div class="confirm {{if this.openTrigger 'show-confirm'}}" ...attributes>
{{yield
(hash
Expand Down

0 comments on commit 5fa9b68

Please sign in to comment.