Skip to content

Instantly share code, notes, and snippets.

@pauln
Last active October 18, 2017 20:59
Show Gist options
  • Save pauln/2d636fea06bd260f3b1471e74681449a to your computer and use it in GitHub Desktop.
Save pauln/2d636fea06bd260f3b1471e74681449a to your computer and use it in GitHub Desktop.
paper-icon-colorful
import Ember from 'ember';
import PaperIcon from 'ember-paper/components/paper-icon';
export default PaperIcon.extend({
attributeBindings: ['aria-label', 'title', 'iconStyle:style', 'iconClass:md-font-icon'],
iconStyle: Ember.computed('sizeStyle', 'color', function() {
let color = this.get('color');
let sizeStyle = this.get('sizeStyle');
let colorStyle = '';
if (color) {
colorStyle = Ember.String.htmlSafe(`color: ${color};`);
}
return colorStyle + sizeStyle;
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment