Skip to content

Commit

Permalink
Update l2t-paper-color-radio.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Link2Twenty authored Jun 2, 2017
1 parent c2833a8 commit aae34f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions l2t-paper-color-radio.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,26 @@
type: String,
value: 'aria-checked'
},
/**
* color: string to store the color value
*/
color: {
type: String,
value: '#3f51b5',
reflectToAttribute: true,
observer: '_colorUpdate'
},
/**
* icon: string to store iron-icon name for the check symbol
*/
icon: {
type: String,
value: 'check'
}
},
/**
* _colorUpdate: updates styles to match color
*/
_colorUpdate: function() {
if(this._testColor()){
this.updateStyles({
Expand All @@ -190,6 +199,9 @@
this.color = "#3f51b5";
}
},
/**
* _testColor: returns true if this.color is valid
*/
_testColor: function() {
var testDiv = document.createElement("div");
testDiv.style.color = this.color;
Expand Down

0 comments on commit aae34f0

Please sign in to comment.