mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 08:54:36 +03:00
9adbcd1fd0
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.
31 lines
521 B
JavaScript
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();
|
|
}
|
|
});
|