Blame view

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