Skip to content

Allow paper-menu's to be displayed with md-dense. #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#286](https://github.com/miguelcobain/ember-paper/pull/286) paper-radio no longer has the class `paper-radio`
- [#286](https://github.com/miguelcobain/ember-paper/pull/286) paper-radio now uses `groupValue` instead of `selected`
- [#286](https://github.com/miguelcobain/ember-paper/pull/286) paper-radio now sends the action `onchange` instead of `changed` and it is mandatory (see ddau)
- [#303](https://github.com/miguelcobain/ember-paper/pull/303) paper-menu template may now specify `dense=true` to display menu items compactly

### 0.2.11

Expand Down
2 changes: 2 additions & 0 deletions addon/components/paper-menu-content-pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ export default Ember.Component.extend({
constants: Ember.inject.service(),

classNames: ['md-default-theme'],
classNameBindings: ['dense:md-dense'],
attributeBindings: ['width'],
width: 4,
dense: false,

menuAbstract: Ember.computed(function() {
let container = this.nearestOfType(PaperMenuAbstract);
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/paper-menu-content.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#paper-menu-content-pane width=width}}
{{#paper-menu-content-pane width=width dense=dense}}
{{yield this}}
{{/paper-menu-content-pane}}
{{#ember-wormhole to="paper-wormhole"}}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/paper-menu.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{yield this}}
{{#if isOpen}}
{{#paper-menu-content width=width}}
{{#paper-menu-content width=width dense=dense}}
{{yield to="inverse"}}
{{/paper-menu-content}}
{{/if}}
{{/if}}