|
| 1 | +<!doctype html> |
| 2 | +<!-- |
| 3 | +@license |
| 4 | +Copyright (c) 2016 The Polymer Project Authors. All rights reserved. |
| 5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt |
| 6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt |
| 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/PATENTS.txt |
| 10 | +--> |
| 11 | +<html> |
| 12 | + <head> |
| 13 | + <title>paper-swatch-picker demo</title> |
| 14 | + |
| 15 | + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> |
| 16 | + <meta name="mobile-web-app-capable" content="yes"> |
| 17 | + <meta name="apple-mobile-web-app-capable" content="yes"> |
| 18 | + |
| 19 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 20 | + <link rel="import" href="../paper-swatch-picker.html"> |
| 21 | + |
| 22 | + <link rel="import" href="../../iron-demo-helpers/demo-snippet.html"> |
| 23 | + <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html"> |
| 24 | + |
| 25 | + <style is="custom-style" include="demo-pages-shared-styles"> |
| 26 | + paper-swatch-picker { |
| 27 | + margin: 0 10px; |
| 28 | + } |
| 29 | + </style> |
| 30 | + </head> |
| 31 | + <body unresolved> |
| 32 | + <div class="vertical-section-container centered"> |
| 33 | + <h3>A color picker of all the Material Design colours</h3> |
| 34 | + <demo-snippet class="centered-demo"> |
| 35 | + <template> |
| 36 | + <paper-swatch-picker></paper-swatch-picker> |
| 37 | + <paper-swatch-picker color="#E91E63"></paper-swatch-picker> |
| 38 | + <!-- Disable the ripple on the color picker button --> |
| 39 | + <paper-swatch-picker color="#2196F3" noink></paper-swatch-picker> |
| 40 | + </template> |
| 41 | + </demo-snippet> |
| 42 | + |
| 43 | + <h3>The palette used by the color picker can be configured</h3> |
| 44 | + <demo-snippet class="centered-demo"> |
| 45 | + <template> |
| 46 | + <paper-swatch-picker column-count=5 color-list='["#65a5f2", "#2b63ba", "#83be54", "#3b8638", "#f0d551", "#d7be48", "#e5943c", "#cf712e", "#a96ddb", "#6f4196"]' ></paper-swatch-picker> |
| 47 | + </template> |
| 48 | + </demo-snippet> |
| 49 | + |
| 50 | + <h3>The picker can be styled using custom properties</h3> |
| 51 | + <demo-snippet class="centered-demo"> |
| 52 | + <template> |
| 53 | + <style is="custom-style"> |
| 54 | + paper-swatch-picker.fancy { |
| 55 | + --paper-swatch-picker-color-size: 10px; |
| 56 | + --paper-swatch-picker-icon-size: 40px; |
| 57 | + } |
| 58 | + </style> |
| 59 | + <paper-swatch-picker class="fancy"></paper-swatch-picker> |
| 60 | + </template> |
| 61 | + </demo-snippet> |
| 62 | + </div> |
| 63 | + </body> |
| 64 | +</html> |
0 commit comments