OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- | 2 <!-- |
3 Copyright 2013 The Polymer Authors. All rights reserved. | 3 Copyright 2013 The Polymer Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style | 4 Use of this source code is governed by a BSD-style |
5 license that can be found in the LICENSE file. | 5 license that can be found in the LICENSE file. |
6 --> | 6 --> |
7 <html> | 7 <html> |
8 <head> | 8 <head> |
9 | 9 |
10 <meta charset="utf-8"> | 10 <meta charset="utf-8"> |
11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
12 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> | 12 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> |
13 | 13 |
14 <title>paper-button</title> | 14 <title>paper-button</title> |
15 | 15 |
16 <script src="../platform/platform.js"></script> | 16 <script src="../webcomponentsjs/webcomponents.js"></script> |
17 | 17 |
18 <link href="../font-roboto/roboto.html" rel="import"> | 18 <link href="../font-roboto/roboto.html" rel="import"> |
19 <link href="../core-icon/core-icon.html" rel="import"> | 19 <link href="../core-icon/core-icon.html" rel="import"> |
20 <link href="../core-icons/core-icons.html" rel="import"> | 20 <link href="../core-icons/core-icons.html" rel="import"> |
21 <link href="paper-button.html" rel="import"> | 21 <link href="paper-button.html" rel="import"> |
22 | 22 |
23 <style shim-shadowdom> | 23 <style shim-shadowdom> |
24 body { | 24 body { |
25 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; | 25 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; |
26 font-size: 14px; | 26 font-size: 14px; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 </head> | 64 </head> |
65 <body unresolved onclick="clickAction(event);"> | 65 <body unresolved onclick="clickAction(event);"> |
66 | 66 |
67 <section> | 67 <section> |
68 | 68 |
69 <div>Flat buttons</div> | 69 <div>Flat buttons</div> |
70 | 70 |
71 <paper-button>button</paper-button> | 71 <paper-button>button</paper-button> |
72 <paper-button class="colored">colored</paper-button> | 72 <paper-button class="colored">colored</paper-button> |
73 <paper-button disabled>disabled</paper-button> | 73 <paper-button disabled>disabled</paper-button> |
| 74 <paper-button noink>noink</paper-button> |
74 | 75 |
75 </section> | 76 </section> |
76 | 77 |
77 <br> | 78 <br> |
78 | 79 |
79 <section> | 80 <section> |
80 | 81 |
81 <div>Raised buttons</div> | 82 <div>Raised buttons</div> |
82 | 83 |
83 <paper-button raised>button</paper-button> | 84 <paper-button raised>button</paper-button> |
84 <paper-button raised class="colored">colored</paper-button> | 85 <paper-button raised class="colored">colored</paper-button> |
85 <paper-button raised disabled>disabled</paper-button> | 86 <paper-button raised disabled>disabled</paper-button> |
| 87 <paper-button raised noink>noink</paper-button> |
86 | 88 |
87 </section> | 89 </section> |
88 | 90 |
89 <section> | 91 <section> |
90 | 92 |
91 <div>Custom button content</div> | 93 <div>Custom button content</div> |
92 | 94 |
93 <paper-button class="colored custom"> | 95 <paper-button class="colored custom"> |
94 <core-icon icon="check"></core-icon> | 96 <core-icon icon="check"></core-icon> |
95 ok | 97 ok |
96 </paper-button> | 98 </paper-button> |
97 <paper-button class="custom"> | 99 <paper-button class="custom"> |
98 <core-icon icon="clear"></core-icon> | 100 <core-icon icon="clear"></core-icon> |
99 cancel | 101 cancel |
100 </paper-button> | 102 </paper-button> |
| 103 <br> |
| 104 <paper-button> |
| 105 <a href="https://www.polymer-project.org" target="_blank">link</a> |
| 106 </paper-button> |
101 | 107 |
102 </section> | 108 </section> |
103 | 109 |
104 <section> | 110 <section> |
105 | 111 |
106 <div>Styling options</div> | 112 <div>Styling options</div> |
107 | 113 |
108 <paper-button class="hover">hover</paper-button> | 114 <paper-button class="hover">hover</paper-button> |
109 <paper-button class="blue-ripple">custom ripple</paper-button> | 115 <paper-button class="blue-ripple">custom ripple</paper-button> |
110 | 116 |
111 </section> | 117 </section> |
112 | 118 |
113 <script> | 119 <script> |
114 | 120 |
115 function clickAction(e) { | 121 function clickAction(e) { |
116 var t = e.target; | 122 var t = e.target; |
117 if (t.localName === 'paper-button') { | 123 if (t.localName === 'paper-button') { |
118 if (t.hasAttribute('disabled')) { | 124 if (t.hasAttribute('disabled')) { |
119 console.error('should not be able to click disabled button', t); | 125 console.error('should not be able to click disabled button', t); |
120 } else { | 126 } else { |
121 console.log('click', t); | 127 console.log('click', t); |
122 } | 128 } |
123 } | 129 } |
124 } | 130 } |
125 | 131 |
126 </script> | 132 </script> |
127 | 133 |
128 </body> | 134 </body> |
129 </html> | 135 </html> |
OLD | NEW |