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:
|
|
|
|
```
|
|
|
|
{{gh-content-cover onClick="closeMenus" onMouseEnter="closeAutoNav"}}
|
|
|
|
```
|
|
|
|
**/
|
|
|
|
|
2015-05-24 08:47:23 +03:00
|
|
|
import Ember from 'ember';
|
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
|
|
|
classNames: ['content-cover'],
|
|
|
|
|
|
|
|
onClick: null,
|
|
|
|
onMouseEnter: null,
|
|
|
|
|
|
|
|
click: function () {
|
|
|
|
this.sendAction('onClick');
|
|
|
|
},
|
|
|
|
|
|
|
|
mouseEnter: function () {
|
|
|
|
this.sendAction('onMouseEnter');
|
|
|
|
}
|
|
|
|
});
|