diff --git a/CHANGELOG.md b/CHANGELOG.md index 7caba2b22..51393184b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Contributions and pull requests are always welcome. Contributors may often be fo - Flex and layout attributes are replaced by classes (see [the documentation](http://miguelcobain.github.io/ember-paper/#/layout/introduction)). `flex=true` on Ember Paper components has also been removed and replaced by classes. ### master +- [#802](https://github.com/miguelcobain/ember-paper/pull/802) allow icons to have tooltips - [#772](https://github.com/miguelcobain/ember-paper/pull/772) fix tabs ink-bar in dialogs - [db3b46c](https://github.com/miguelcobain/ember-paper/commit/db3b46cb3f7c6090b1fb5707c841a855fd5a4de5) paper-tooltip is now a tagless component and proxies `class` attributes to the tooltip element class diff --git a/addon/templates/components/paper-icon.hbs b/addon/templates/components/paper-icon.hbs index 909a03c3f..6bb4205b7 100644 --- a/addon/templates/components/paper-icon.hbs +++ b/addon/templates/components/paper-icon.hbs @@ -1 +1,2 @@ -{{-paper-underscore iconClass}} \ No newline at end of file +{{-paper-underscore iconClass}} +{{yield}} diff --git a/tests/dummy/app/templates/demo/tooltip.hbs b/tests/dummy/app/templates/demo/tooltip.hbs index 660ff6dc9..c3a15a19c 100644 --- a/tests/dummy/app/templates/demo/tooltip.hbs +++ b/tests/dummy/app/templates/demo/tooltip.hbs @@ -56,6 +56,14 @@ Delete {{/paper-tooltip}} {{/paper-button}} + +
+ {{#paper-icon "info"}} + {{#paper-tooltip position=position}} + Icon tooltip + {{/paper-tooltip}} + {{/paper-icon}} +
{{! END-SNIPPET tooltip }} diff --git a/tests/integration/components/paper-icon-test.js b/tests/integration/components/paper-icon-test.js index 6a1fc044f..ce70835b8 100644 --- a/tests/integration/components/paper-icon-test.js +++ b/tests/integration/components/paper-icon-test.js @@ -23,10 +23,10 @@ test('it renders with classes', function(assert) { assert.ok($component.hasClass('paper-icon')); assert.ok($component.hasClass('material-icons')); - assert.equal($component.text(), 'foo'); + assert.equal($component.text().trim(), 'foo'); this.set('icon', 'bar'); - assert.equal($component.text(), 'bar'); - assert.notEqual($component.text(), 'foo'); + assert.equal($component.text().trim(), 'bar'); + assert.notEqual($component.text().trim(), 'foo'); }); test('it renders with spin class', function(assert) {