instructure / ic-menu

accessible popup menu component
MIT License
45 stars 9 forks source link

ic-menu Build Status

An accessible menu component for ember applications.

Demo

http://instructure.github.io/ic-menu/

Installation

bower install ic-menu

Usage

application.hbs

{{#ic-menu}}
  {{#ic-menu-trigger}}Actions{{/ic-menu-trigger}}
  {{#ic-menu-list}}
    {{#ic-menu-item on-select="remove"}}Remove{{/ic-menu-item}}
    {{#ic-menu-item on-select="save"
                    on-disabled-select="notifyDisabled"
                    enabled=foo}}
      Save
    {{/ic-menu-item}}
  {{/ic-menu-list}}
{{/ic-menu}}

__application_controller.js__

App.ApplicationController = Ember.Controller.extend({

  actions: {
    remove: function(icMenuItem) {
      // do stuff with the icMenuItem instance
    },
    save: function(icMenuItem) {
      // do stuff with the icMenuItem instance
    }
  }

});

Development

  1. Fork the repo
  2. npm install && bower install
  3. Create a new branch for your feature/bug fix
  4. grunt to build and watch files.
  5. testem in a new tab to run tests.
  6. Send a pull request.