0.77.1-alpha.2 • Published 7 years ago
@ivanvanderbyl/ember-material-components-menu-surface v0.77.1-alpha.2
@ivanvanderbyl/ember-material-components-menu-surface
ember-cli addon for @material/menu-surface.
Installation
ember install @ivanvanderbyl/ember-material-components-menu-surfaceComponents and Mixins
Components
Mixins
{{mdc-menu-surface}}
Description
Add a menu surface component to the page.
Usage
{{mdc-menu-surface open=[true|false]
anchor=["parent"|"body"]
quickOpen=[true|false]
position=[null|"fixed"|"absolute"]
positionLeft=number
positionTop=number
}}Attributes
open- Trigger the surface to open.anchor- Optional anchor point for the menu surface. Default is"parent", but can also be"body".quickOpen- Enable quick open.position- Optional position of the menu surface.positionLeft- Left position of the menu (works only in absolute mode).positionTop- Top position of the menu (works only in absolute mode).
MenuSurface
Description
Convert an existing component into a menu surface.
Usage
import MenuSurface from '@ivanvanderbyl/ember-material-components-menu-surface/mixins/menu-surface';
import Component from '@ember/component';
export default Component.extend (MenuSurface, {
});Methods
The component must implement the following methods:
setAbsolutePosition (x, y)hoistMenuToBody ()doOpen (open)doQuickOpen
0.77.1-alpha.2
7 years ago