Files
threshold-ui/addons/core/addon/helpers/is-loading.js
T
hashicorp-copywrite[bot]andCameron Perera 3d610427d0 [COMPLIANCE] Add Copyright and License Headers (#1617)
* [COMPLIANCE] Add Copyright and License Headers

* chore: 🤖 update Copyright headers to satisfy our lint rules

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-03-01 09:39:41 -06:00

28 lines
550 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
/**
* This helper returns true or false based on the state of the ember-loading
* service's `isLoading` attribute.
*/
export default class extends Helper {
// =services
@service loading;
// =methods
/**
* Returns true if "something" is loading according to ember-loading.
* @return {boolean}
*/
compute() {
return this.loading.isLoading;
}
}