Ghost/ghost/admin/app/components/gh-content-cover.js
Kevin Ansfield 9adbcd1fd0 Match service/controller import to ember-modules-codemod style for consistency
no issue

Automated tools, code generators, and editor integrations are increasingly standardising on the import style used in `ember-modules-codemod`. Our import style differed a little with regards to service/controller injection imports which meant we were starting to see inconsistent naming.
2017-10-30 09:38:01 +00:00

31 lines
521 B
JavaScript

/*
Implements a div for covering the page content
when in a menu context that, for example,
should be closed when the user clicks elsewhere.
Example:
```
{{gh-content-cover}}
```
**/
import Component from '@ember/component';
import {inject as service} from '@ember/service';
export default Component.extend({
ui: service(),
classNames: ['content-cover'],
onMouseEnter: null,
click() {
this.get('ui').closeMenus();
},
mouseEnter() {
this.get('ui').closeAutoNav();
}
});