| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 Polymer({ | 5 Polymer({ |
| 6 is: 'oobe-icon-button', | 6 is: 'oobe-text-button', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 disabled: {type: Boolean, value: false, reflectToAttribute: true}, | 9 disabled: {type: Boolean, value: false, reflectToAttribute: true}, |
| 10 | 10 |
| 11 icon: String, | 11 inverse: Boolean, |
| 12 | |
| 13 ariaLabel: String | |
| 14 }, | 12 }, |
| 15 | 13 |
| 16 focus: function() { | 14 focus: function() { |
| 17 this.$.iconButton.focus(); | 15 this.$.textButton.focus(); |
| 18 }, | 16 }, |
| 19 | 17 |
| 20 onClick_: function(e) { | 18 onClick_: function(e) { |
| 21 if (this.disabled) | 19 if (this.disabled) |
| 22 e.stopPropagation(); | 20 e.stopPropagation(); |
| 23 } | 21 } |
| 24 }); | 22 }); |
| 25 | 23 |
| 26 Polymer({ | 24 Polymer({ |
| 27 is: 'oobe-text-button', | 25 is: 'oobe-welcome-secondary-button', |
| 28 | 26 |
| 29 properties: { | 27 properties: { |
| 30 disabled: {type: Boolean, value: false, reflectToAttribute: true}, | 28 icon: String, |
| 31 | 29 |
| 32 label: String, | 30 ariaLabel: String |
| 33 | |
| 34 inverse: Boolean, | |
| 35 }, | 31 }, |
| 36 | |
| 37 focus: function() { | |
| 38 this.$.textButton.focus(); | |
| 39 }, | |
| 40 | |
| 41 onClick_: function(e) { | |
| 42 if (this.disabled) | |
| 43 e.stopPropagation(); | |
| 44 } | |
| 45 }); | 32 }); |
| OLD | NEW |