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