OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 @license |
| 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 5 This code may only be used under the BSD style license found at http://polymer.g
ithub.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/CONTRI
BUTORS.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/PATEN
TS.txt |
| 10 --> |
| 11 <html> |
| 12 <head> |
| 13 <title>paper-radio-group demo</title> |
| 14 |
| 15 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximu
m-scale=1.0"> |
| 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="../../iron-demo-helpers/demo-snippet.html"> |
| 21 <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.ht
ml"> |
| 22 <link rel="import" href="../../paper-radio-button/paper-radio-button.html"> |
| 23 <link rel="import" href="../paper-radio-group.html"> |
| 24 |
| 25 <style is="custom-style" include="demo-pages-shared-styles"> |
| 26 .vertical-section-container { |
| 27 max-width: 500px; |
| 28 } |
| 29 |
| 30 label { |
| 31 align-self: center; |
| 32 } |
| 33 </style> |
| 34 </head> |
| 35 |
| 36 <body unresolved> |
| 37 <div class="vertical-section-container centered"> |
| 38 <h3>A paper-radio-group allows only one item to be selected</h3> |
| 39 <demo-snippet class="centered-demo"> |
| 40 <template> |
| 41 <label id="label1">Dinosaurs:</label> |
| 42 <paper-radio-group aria-labelledby="label1"> |
| 43 <paper-radio-button name="a">allosaurus</paper-radio-button> |
| 44 <paper-radio-button name="b">brontosaurus</paper-radio-button> |
| 45 <paper-radio-button name="d" disabled>diplodocus</paper-radio-button
> |
| 46 </paper-radio-group> |
| 47 </template> |
| 48 </demo-snippet> |
| 49 |
| 50 <h3>It can have an initial selection</h3> |
| 51 <demo-snippet class="centered-demo"> |
| 52 <template> |
| 53 <label id="label2">Dinosaurs:</label> |
| 54 <paper-radio-group selected="b" aria-labelledby="label2"> |
| 55 <paper-radio-button name="a">allosaurus</paper-radio-button> |
| 56 <paper-radio-button name="b">brontosaurus</paper-radio-button> |
| 57 <paper-radio-button name="d" disabled>diplodocus</paper-radio-button
> |
| 58 </paper-radio-group> |
| 59 </template> |
| 60 </demo-snippet> |
| 61 |
| 62 <h3>It can optionally allow items to be deselected</h3> |
| 63 <demo-snippet class="centered-demo"> |
| 64 <template> |
| 65 <label id="label3">Dinosaurs:</label> |
| 66 <paper-radio-group selected="b" allow-empty-selection aria-labelledby=
"label3"> |
| 67 <paper-radio-button name="a">allosaurus</paper-radio-button> |
| 68 <paper-radio-button name="b">brontosaurus</paper-radio-button> |
| 69 <paper-radio-button name="d" disabled>diplodocus</paper-radio-button
> |
| 70 </paper-radio-group> |
| 71 </template> |
| 72 </demo-snippet> |
| 73 |
| 74 </div> |
| 75 </body> |
| 76 </html> |
OLD | NEW |