包详细信息

ember-cli-mdc-menu-surface

onehilltech450Apache-2.03.0.17

ember-cli addon for @material/menu-surface.

ember-addon, material, material design, material components

自述文件

ember-cli-mdc-menu-surface

ember-cli addon for @material/menu-surface.

Installation

ember install ember-cli-mdc-menu-surface

Components and Mixins

Components

Modifiers

MdcMenuSurface

Description

Add a menu surface component to the page.

Usage

<MdcMenuSurface @open=[true|false]
                @quickOpen=[true|false]
                @anchor=[HTMLElement|string]
                @anchorMargin=[number]
                @anchorCorner=[string] 
                @position=["fixed"|"absolute"]
                @left=number
                @top=number />

Attributes

  • open - Trigger the surface to open
  • quickOpen - Enable quick open
  • anchor - Optional anchor point for the menu surface
  • anchorMargin - Margin between the menu surface and anchor
  • anchorCorner - Corner of achor element to affix menu surface
  • position - Either "fixed" or "absolute"
  • left - Left position of the menu (works only in absolute mode)
  • top - Top position of the menu (works only in absolute mode)

mdc-menu-surface-anchor

Description

The {{mdc-menu-surface-anchor}} modifier defines the anchor element for a menu.

Usage

<div class="toolbar" {{mdc-menu-surface-anchor}}>
  <button {{on "click" this.toggleMenu}}>Open Menu</button>

  <MdcMenuSurface @open={{this.openMenu}}>
    <!-- -->
  </MdcMenuSurface>
</div>