OLD | NEW |
1 # paper-radio-button | 1 # paper-radio-button |
2 | 2 |
3 `paper-radio-button` is a button that can be either checked or unchecked. | 3 `paper-radio-button` is a button that can be either checked or unchecked. |
4 User can tap the radio button to check it. But it cannot be unchecked by | 4 User can tap the radio button to check it. But it cannot be unchecked by |
5 tapping once checked. | 5 tapping once checked. |
6 | 6 |
7 Use `paper-radio-group` to group a set of radio buttons. When radio buttons | 7 Use `paper-radio-group` to group a set of radio buttons. When radio buttons |
8 are inside a radio group, only one radio button in the group can be checked. | 8 are inside a radio group, only one radio button in the group can be checked. |
9 | 9 |
10 Example: | 10 Example: |
11 | 11 |
12 ```html | 12 ```html |
13 <paper-radio-button></paper-radio-button> | 13 <paper-radio-button></paper-radio-button> |
14 ``` | 14 ``` |
15 Styling a radio button: | 15 Styling a radio button: |
16 | 16 |
17 ```html | 17 ```html |
18 <style is="custom-style"> | 18 <style is="custom-style"> |
19 :root { | 19 :root { |
20 /* Unchecked state colors. */ | 20 /* Unchecked state colors. */ |
21 --paper-radio-button-unchecked-color: #5a5a5a; | 21 --paper-radio-button-unchecked-color: #5a5a5a; |
22 --paper-radio-button-unchecked-ink-color: #5a5a5a; | 22 --paper-radio-button-unchecked-ink-color: #5a5a5a; |
23 | 23 |
24 /* Checked state colors. */ | 24 /* Checked state colors. */ |
25 --paper-radio-button-checked-color: #009688; | 25 --paper-radio-button-checked-color: #009688; |
26 --paper-radio-button-checked-ink-color: #0f9d58; | 26 --paper-radio-button-checked-ink-color: #0f9d58; |
27 } | 27 } |
28 </style> | 28 </style> |
29 ``` | 29 ``` |
OLD | NEW |