Skip to content

Commit

Permalink
feat(Modal): support custom class
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Nov 30, 2016
1 parent 3a39999 commit 2b23316
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/templates/components/bs-modal.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{#ember-wormhole to="ember-bootstrap-modal-container" renderInPlace=_renderInPlace}}

{{#bs-modal-dialog close=(action "close") fade=fade in=in id=modalId title=title closeButton=closeButton keyboard=keyboard header=header body=body footer=footer size=size backdropClose=backdropClose}}
{{#bs-modal-dialog close=(action "close") class=class fade=fade in=in id=modalId title=title closeButton=closeButton keyboard=keyboard header=header body=body footer=footer size=size backdropClose=backdropClose}}
{{yield this}}
{{/bs-modal-dialog}}

Expand Down
10 changes: 10 additions & 0 deletions tests/integration/components/bs-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,13 @@ test('Resets scroll bar when component is removed from view', function(assert) {
done();
}, transitionTimeout);
});

test('it passes along class attribute', function(assert) {
this.render(hbs`
{{#bs-modal fade=false class="custom"}}
template block text
{{/bs-modal}}
`);

assert.equal(this.$('.modal.custom').length, 1);
});

0 comments on commit 2b23316

Please sign in to comment.