Last active
October 18, 2017 20:59
-
-
Save pauln/2d636fea06bd260f3b1471e74681449a to your computer and use it in GitHub Desktop.
paper-icon-colorful
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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