mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
fb239054a0
follow up from #95 - converts components to use ember-cli-shims
29 lines
519 B
JavaScript
29 lines
519 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 onClick="closeMenus" onMouseEnter="closeAutoNav"}}
|
|
```
|
|
**/
|
|
|
|
import Component from 'ember-component';
|
|
|
|
export default Component.extend({
|
|
classNames: ['content-cover'],
|
|
|
|
onClick: null,
|
|
onMouseEnter: null,
|
|
|
|
click() {
|
|
this.sendAction('onClick');
|
|
},
|
|
|
|
mouseEnter() {
|
|
this.sendAction('onMouseEnter');
|
|
}
|
|
});
|