mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
f07940f0e7
no issue - find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
27 lines
546 B
JavaScript
27 lines
546 B
JavaScript
import classic from 'ember-classic-decorator';
|
|
import {classNames} from '@ember-decorators/component';
|
|
import {inject as service} from '@ember/service';
|
|
/*
|
|
|
|
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';
|
|
|
|
@classic
|
|
@classNames('content-cover')
|
|
export default class GhContentCover extends Component {
|
|
@service ui;
|
|
|
|
click() {
|
|
this.ui.closeMenus();
|
|
}
|
|
}
|