| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 @license |
| 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE |
| 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS |
| 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS |
| 8 Code distributed by Google as part of the polymer project is also |
| 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS |
| 10 --> |
| 11 <html> |
| 12 <head> |
| 13 <title>paper-icon-button</title> |
| 14 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia
l-scale=1, user-scalable=yes"> |
| 15 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 16 |
| 17 <link rel="import" href="../../iron-icons/iron-icons.html"> |
| 18 <link rel="import" href="../../paper-styles/paper-styles.html"> |
| 19 <link rel="import" href="../../paper-styles/demo-pages.html"> |
| 20 <link rel="import" href="../paper-icon-button.html"> |
| 21 |
| 22 <style is="custom-style"> |
| 23 .horizontal-section { |
| 24 min-width: 100px; |
| 25 } |
| 26 |
| 27 paper-icon-button { |
| 28 margin-left: 30px; |
| 29 display: block; |
| 30 width: 24px; |
| 31 text-align: center; |
| 32 } |
| 33 |
| 34 paper-icon-button.blue { |
| 35 color: var(--paper-light-blue-500); |
| 36 } |
| 37 |
| 38 paper-icon-button.red { |
| 39 color: var(--paper-red-500); |
| 40 } |
| 41 |
| 42 paper-icon-button.orange { |
| 43 color: var(--paper-orange-500); |
| 44 } |
| 45 |
| 46 paper-icon-button.green { |
| 47 color: var(--paper-green-500); |
| 48 } |
| 49 |
| 50 paper-icon-button.blue:hover { |
| 51 background: var(--paper-light-blue-50); |
| 52 border-radius: 50%; |
| 53 } |
| 54 |
| 55 paper-icon-button.red:hover { |
| 56 background: var(--paper-red-50); |
| 57 border-radius: 50%; |
| 58 } |
| 59 |
| 60 paper-icon-button.orange:hover { |
| 61 background: var(--paper-orange-50); |
| 62 border-radius: 50%; |
| 63 } |
| 64 |
| 65 paper-icon-button.green:hover { |
| 66 background: var(--paper-green-50); |
| 67 border-radius: 50%; |
| 68 } |
| 69 |
| 70 paper-icon-button.huge { |
| 71 margin-left: 0px; |
| 72 width: 100px; |
| 73 --paper-icon-button-ink-color: var(--paper-indigo-500); |
| 74 } |
| 75 |
| 76 paper-icon-button.huge::shadow #icon { |
| 77 width: 100px; |
| 78 height: 100px; |
| 79 } |
| 80 |
| 81 paper-icon-button.huge #icon { |
| 82 width: 100px; |
| 83 height: 100px; |
| 84 } |
| 85 </style> |
| 86 |
| 87 </head> |
| 88 |
| 89 <body onclick="clickAction(event);"> |
| 90 |
| 91 <div class="horizontal center-justified layout"> |
| 92 <div> |
| 93 <h4>Enabled</h4> |
| 94 <div class="horizontal-section"> |
| 95 <paper-icon-button icon="menu" alt="menu" title="menu"></paper-icon-bu
tton> |
| 96 <paper-icon-button icon="favorite" alt="heart" title="heart"></paper-i
con-button> |
| 97 <paper-icon-button icon="arrow-back" alt="arrow-back" title="arrow-bac
k"></paper-icon-button> |
| 98 <paper-icon-button icon="arrow-forward" alt="arrow-forward" title="arr
ow-forward"></paper-icon-button> |
| 99 <paper-icon-button icon="clear" alt="clear" title="clear"></paper-icon
-button> |
| 100 <paper-icon-button icon="polymer" alt="polymer" title="polymer"></pape
r-icon-button> |
| 101 <paper-icon-button src="https://assets-cdn.github.com/images/modules/l
ogos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button> |
| 102 </div> |
| 103 </div> |
| 104 |
| 105 <div> |
| 106 <h4>Disabled</h4> |
| 107 <div class="horizontal-section"> |
| 108 <paper-icon-button icon="menu" alt="menu" disabled></paper-icon-button
> |
| 109 <paper-icon-button icon="favorite" alt="heart" disabled></paper-icon-b
utton> |
| 110 <paper-icon-button icon="arrow-back" alt="arrow-back" disabled></paper
-icon-button> |
| 111 <paper-icon-button icon="arrow-forward" alt="arrow-forward" disabled><
/paper-icon-button> |
| 112 <paper-icon-button icon="clear" alt="clear" disabled></paper-icon-butt
on> |
| 113 <paper-icon-button icon="polymer" alt="polymer" disabled></paper-icon-
button> |
| 114 <paper-icon-button src="https://assets-cdn.github.com/images/modules/l
ogos_page/Octocat.png" alt="octocat" disabled></paper-icon-button> |
| 115 </div> |
| 116 </div> |
| 117 |
| 118 <div> |
| 119 <h4>Color</h4> |
| 120 <div class="horizontal-section"> |
| 121 <paper-icon-button icon="menu" alt="menu" class="blue"></paper-icon-bu
tton> |
| 122 <paper-icon-button icon="favorite" alt="heart" class="red"></paper-ico
n-button> |
| 123 <paper-icon-button icon="arrow-back" alt="arrow-back" class="orange"><
/paper-icon-button> |
| 124 <paper-icon-button icon="arrow-forward" alt="arrow-forward" class="gre
en"></paper-icon-button> |
| 125 <paper-icon-button icon="clear" alt="clear" class="blue"></paper-icon-
button> |
| 126 <paper-icon-button icon="polymer" alt="polymer" class="red"></paper-ic
on-button> |
| 127 <paper-icon-button class="blue" src="https://assets-cdn.github.com/ima
ges/modules/logos_page/Octocat.png" alt="octocat"></paper-icon-button> |
| 128 </div> |
| 129 </div> |
| 130 |
| 131 <div> |
| 132 <h4>Size</h4> |
| 133 <div class="horizontal-section"> |
| 134 <paper-icon-button icon="favorite" alt="heart" class="huge"></paper-ic
on-button> |
| 135 <br><br><br> |
| 136 <paper-icon-button icon="polymer" alt="polymer" class="huge"></paper-i
con-button> |
| 137 </div> |
| 138 </div> |
| 139 </div> |
| 140 |
| 141 <script> |
| 142 function clickAction(e) { |
| 143 var t = e.target; |
| 144 if (t.localName === 'paper-icon-button') { |
| 145 if (t.hasAttribute('disabled')) { |
| 146 console.error('should not be able to click disabled button', t); |
| 147 } else { |
| 148 console.log('click', t); |
| 149 } |
| 150 } |
| 151 } |
| 152 </script> |
| 153 </body> |
| 154 </html> |
| OLD | NEW |