| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |  | 
| 2 // Use of this source code is governed by a BSD-style license that can be |  | 
| 3 // found in the LICENSE file. |  | 
| 4 |  | 
| 5 /** |  | 
| 6  * @fileoverview |  | 
| 7  * 'cr-button' is a chrome-specific wrapper around paper-button. |  | 
| 8  * |  | 
| 9  * Example: |  | 
| 10  * |  | 
| 11  *    <cr-button>Press Here</cr-button> |  | 
| 12  *    <cr-button raised>Raised Button</cr-button> |  | 
| 13  *    <cr-button> |  | 
| 14  *      <iron-icon icon="favorite"></iron-icon> Custom button |  | 
| 15  *    </cr-button> |  | 
| 16  * |  | 
| 17  * @group Chrome Elements |  | 
| 18  * @element cr-button |  | 
| 19  */ |  | 
| 20 Polymer({ |  | 
| 21   is: 'cr-button', |  | 
| 22 |  | 
| 23   properties: { |  | 
| 24     /** |  | 
| 25      * If true, the button will be styled with a shadow. |  | 
| 26      */ |  | 
| 27     raised: { |  | 
| 28       type: Boolean, |  | 
| 29       value: false, |  | 
| 30       reflectToAttribute: true |  | 
| 31     }, |  | 
| 32 |  | 
| 33     /** |  | 
| 34      * If true, the button will be disabled and greyed out. |  | 
| 35      */ |  | 
| 36     disabled: { |  | 
| 37       type: Boolean, |  | 
| 38       value: false, |  | 
| 39       reflectToAttribute: true |  | 
| 40     }, |  | 
| 41 |  | 
| 42     /** |  | 
| 43      * If true, clicking the button toggles the active state. |  | 
| 44      */ |  | 
| 45     toggles: { |  | 
| 46       type: Boolean, |  | 
| 47       value: false |  | 
| 48     }, |  | 
| 49 |  | 
| 50     noink: { |  | 
| 51       type: Boolean, |  | 
| 52       value: false, |  | 
| 53     }, |  | 
| 54 |  | 
| 55     /** |  | 
| 56      * If true, the button is in the active state. Mostly useful when |  | 
| 57      * |toggles| is true. |  | 
| 58      */ |  | 
| 59     active: { |  | 
| 60       type: Boolean, |  | 
| 61       value: false, |  | 
| 62       notify: true |  | 
| 63     } |  | 
| 64   }, |  | 
| 65 |  | 
| 66   /** @private */ |  | 
| 67   computeNoInk_: function() { |  | 
| 68     return this.toggles || this.noink; |  | 
| 69   }, |  | 
| 70 }); |  | 
| OLD | NEW | 
|---|