Ghost/ghost/admin/app/components/gh-content-cover.js
Matt Enlow 753da0231f Add mobile menu open button and close on click outside nav
- Adds gh-view-title component to implement mobile menu button for titles on any page
- Refactors the `content-cover` out into the application template
- Fix various z-index issues with content-cover and gh-alert
- Move `.settings-menu-expanded` application view state from body to `.gh-viewport`
- Unify nav menu / mobile menu actions and code
2015-06-08 22:13:34 +02:00

29 lines
533 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 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');
}
});