mirror of https://github.com/status-im/consul.git
17 lines
448 B
JavaScript
17 lines
448 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Modifier from 'ember-modifier';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class CSSPropModifier extends Modifier {
|
|
@service('-document') doc;
|
|
|
|
modify(element, positional, named) {
|
|
const returns = positional[1] || named?.returns;
|
|
returns(this.doc.defaultView.getComputedStyle(element).getPropertyValue(positional[0]));
|
|
}
|
|
}
|