2022-02-01 12:34:03 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
import {classNames} from '@ember-decorators/component';
|
|
|
|
import {inject as service} from '@ember/service';
|
2015-05-27 17:39:56 +03:00
|
|
|
/*
|
|
|
|
|
|
|
|
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:
|
|
|
|
```
|
2017-08-14 15:30:00 +03:00
|
|
|
{{gh-content-cover}}
|
2015-05-27 17:39:56 +03:00
|
|
|
```
|
|
|
|
**/
|
|
|
|
|
2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
2017-08-14 15:30:00 +03:00
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@classic
|
|
|
|
@classNames('content-cover')
|
|
|
|
export default class GhContentCover extends Component {
|
2022-02-01 20:03:45 +03:00
|
|
|
@service ui;
|
2015-05-24 08:47:23 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
click() {
|
2019-03-06 16:53:54 +03:00
|
|
|
this.ui.closeMenus();
|
2015-05-24 08:47:23 +03:00
|
|
|
}
|
2022-02-01 12:34:03 +03:00
|
|
|
}
|