From 73089ed9eaecb5a7009497bb4ffc5fcae45363b6 Mon Sep 17 00:00:00 2001 From: wenincode Date: Fri, 13 Oct 2023 13:33:25 -0600 Subject: [PATCH] Update css-prop modifier to new structure --- .../components/disclosure-menu/menu/index.hbs | 18 +++++-------- .../consul-ui/app/components/menu/index.hbs | 25 ++++++++++--------- .../consul-ui/app/modifiers/css-prop.js | 9 +++---- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/ui/packages/consul-ui/app/components/disclosure-menu/menu/index.hbs b/ui/packages/consul-ui/app/components/disclosure-menu/menu/index.hbs index 8ad9a72ab3..4f814ece77 100644 --- a/ui/packages/consul-ui/app/components/disclosure-menu/menu/index.hbs +++ b/ui/packages/consul-ui/app/components/disclosure-menu/menu/index.hbs @@ -4,9 +4,7 @@ }} <@disclosure.Details as |details|> - +
- {{yield (hash - Menu=(component 'menu' - disclosure=@disclosure - pager=pager - ) - )}} + {{yield (hash Menu=(component 'menu' disclosure=@disclosure pager=pager))}}
- - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/menu/index.hbs b/ui/packages/consul-ui/app/components/menu/index.hbs index 34c8b5cc08..8ce48259f3 100644 --- a/ui/packages/consul-ui/app/components/menu/index.hbs +++ b/ui/packages/consul-ui/app/components/menu/index.hbs @@ -4,21 +4,22 @@ }} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/modifiers/css-prop.js b/ui/packages/consul-ui/app/modifiers/css-prop.js index b986cd2452..9b3832ffec 100644 --- a/ui/packages/consul-ui/app/modifiers/css-prop.js +++ b/ui/packages/consul-ui/app/modifiers/css-prop.js @@ -8,10 +8,9 @@ import { inject as service } from '@ember/service'; export default class CSSPropModifier extends Modifier { @service('-document') doc; - didReceiveArguments() { - const params = this.args.positional; - const options = this.args.named; - const returns = params[1] || options.returns; - returns(this.doc.defaultView.getComputedStyle(this.element).getPropertyValue(params[0])); + + modify(element, positional, named) { + const returns = positional[1] || named?.returns; + returns(this.doc.defaultView.getComputedStyle(element).getPropertyValue(positional[0])); } }