| OLD | NEW |
| (Empty) | |
| 1 <!-- |
| 2 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 3 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 5 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 6 Code distributed by Google as part of the polymer project is also |
| 7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 8 --> |
| 9 |
| 10 <link rel="import" href="../../polymer/polymer.html"> |
| 11 <link rel="import" href="../iron-button-state.html"> |
| 12 <link rel="import" href="../iron-control-state.html"> |
| 13 |
| 14 <dom-module id="simple-button"> |
| 15 |
| 16 <style> |
| 17 |
| 18 :host { |
| 19 display: inline-block; |
| 20 background-color: #4285F4; |
| 21 color: #fff; |
| 22 min-height: 8px; |
| 23 min-width: 8px; |
| 24 padding: 16px; |
| 25 text-transform: uppercase; |
| 26 border-radius: 3px; |
| 27 -moz-user-select: none; |
| 28 -ms-user-select: none; |
| 29 -webkit-user-select: none; |
| 30 user-select: none; |
| 31 cursor: pointer; |
| 32 } |
| 33 |
| 34 :host([disabled]) { |
| 35 opacity: 0.3; |
| 36 pointer-events: none; |
| 37 } |
| 38 |
| 39 :host([active]), |
| 40 :host([pressed]) { |
| 41 background-color: #3367D6; |
| 42 box-shadow: inset 0 3px 5px rgba(0,0,0,.2); |
| 43 } |
| 44 |
| 45 </style> |
| 46 |
| 47 <template> |
| 48 |
| 49 <content></content> |
| 50 |
| 51 </template> |
| 52 |
| 53 <script> |
| 54 |
| 55 Polymer({ |
| 56 |
| 57 behaviors: [ |
| 58 Polymer.IronControlState, |
| 59 Polymer.IronButtonState |
| 60 ], |
| 61 |
| 62 hostAttributes: { |
| 63 role: 'button' |
| 64 } |
| 65 }); |
| 66 |
| 67 </script> |
| 68 |
| 69 </dom-module> |
| 70 |
| OLD | NEW |