OLD | NEW |
| (Empty) |
1 <!-- | |
2 @license | |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | |
7 Code distributed by Google as part of the polymer project is also | |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | |
9 --><html><head><link rel="import" href="../polymer/polymer.html"> | |
10 <link rel="import" href="../paper-ripple/paper-ripple.html"> | |
11 <link rel="import" href="../paper-behaviors/paper-radio-button-behavior.html"> | |
12 | |
13 <!-- | |
14 `paper-toggle-button` provides a ON/OFF switch that user can toggle the state | |
15 by tapping or by dragging the switch. | |
16 | |
17 Example: | |
18 | |
19 <paper-toggle-button></paper-toggle-button> | |
20 | |
21 ### Styling | |
22 | |
23 The following custom properties and mixins are available for styling: | |
24 | |
25 Custom property | Description | Default | |
26 ----------------|-------------|---------- | |
27 `--paper-toggle-button-unchecked-bar-color` | Slider color when the input is not
checked | `#000000` | |
28 `--paper-toggle-button-unchecked-button-color` | Button color when the input is
not checked | `--paper-grey-50` | |
29 `--paper-toggle-button-unchecked-ink-color` | Selected/focus ripple color when t
he input is not checked | `--dark-primary-color` | |
30 `--paper-toggle-button-checked-bar-color` | Slider button color when the input i
s checked | `--google-green-500` | |
31 `--paper-toggle-button-checked-button-color` | Button color when the input is ch
ecked | `--google-green-500` | |
32 `--paper-toggle-button-checked-ink-color` | Selected/focus ripple color when the
input is checked | `--google-green-500` | |
33 | |
34 @group Paper Elements | |
35 @element paper-toggle-button | |
36 @hero hero.svg | |
37 @demo demo/index.html | |
38 --> | |
39 <style is="custom-style"> | |
40 :root { | |
41 --paper-toggle-button-unchecked-bar-color: #000000; | |
42 --paper-toggle-button-unchecked-button-color: var(--paper-grey-50); | |
43 --paper-toggle-button-unchecked-ink-color: var(--dark-primary-color); | |
44 | |
45 --paper-toggle-button-checked-bar-color: var(--google-green-500); | |
46 --paper-toggle-button-checked-button-color: var(--google-green-500); | |
47 --paper-toggle-button-checked-ink-color: var(--google-green-500); | |
48 } | |
49 </style> | |
50 | |
51 </head><body><dom-module id="paper-toggle-button"> | |
52 | |
53 <link rel="import" type="css" href="paper-toggle-button.css"> | |
54 | |
55 <template> | |
56 | |
57 <div id="toggleContainer"> | |
58 <div id="toggleBar" class="toggle-bar"></div> | |
59 <div id="toggleButton" class="toggle-button"> | |
60 <paper-ripple id="ink" class="toggle-ink circle" recenters=""></paper-ri
pple> | |
61 </div> | |
62 </div> | |
63 | |
64 </template> | |
65 | |
66 </dom-module> | |
67 <script src="paper-toggle-button-extracted.js"></script></body></html> | |
OLD | NEW |