File tree Expand file tree Collapse file tree 2 files changed +29
-6
lines changed
Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 1- < pf-radio > </ pf-radio >
1+ < section class ='container '>
2+ < p > Select a title </ p >
3+ < div class ='radio-group '>
4+ < pf-radio id ="title-mr " label ="Mr " name ="title " checked =${false} > </ pf-radio >
5+ < pf-radio id ="title-miss " label ="Miss " name ="title " checked =${false} > </ pf-radio >
6+ < pf-radio id ="title-mrs " label ="Mrs " name ="title " checked =${false} > </ pf-radio >
7+ < pf-radio id ="title-ms " label ="Ms " name ="title " checked =${false} > </ pf-radio >
8+ < pf-radio id ="title-dr " label ="Dr " name ="title " checked =${false} > </ pf-radio >
9+ < pf-radio id ="title-other " label ="Other " name ="title " checked =${false} > </ pf-radio >
10+ </ div >
11+ < pf-button > Submit</ pf-button >
12+ </ section >
213
314< script type ="module ">
415 import '@patternfly/elements/pf-radio/pf-radio.js' ;
16+ import '@patternfly/elements/pf-button/pf-button.js' ;
517</ script >
618
719< style >
8- pf-radio {
9- /* insert demo styles */
20+ .container {
21+ padding : 3rem ;
22+ }
23+ .container p {
24+ font-size : 1.5rem ;
25+ margin-block-end : 0.5rem ;
26+ }
27+ .radio-group {
28+ display : flex;
29+ justify-content : flex-start;
30+ padding-bottom : 1rem ;
31+ }
32+ .radio-group pf-radio {
33+ padding-right : 1rem ;
1034}
1135</ style >
1236
Original file line number Diff line number Diff line change 11import { LitElement , html , type TemplateResult } from 'lit' ;
22import { customElement } from 'lit/decorators/custom-element.js' ;
3-
43import styles from './pf-radio.css' ;
54import { property } from 'lit/decorators/property.js' ;
65
@@ -127,15 +126,15 @@ export class PfRadio extends LitElement {
127126
128127 render ( ) : TemplateResult < 1 > {
129128 return html `
130- < label for =${ this . id } > ${ this . label } </ label >
131129 < input
132130 @click =${ this . #onRadioButtonClick}
133131 id =${ this . id }
134132 .name=${ this . name }
135133 type='radio'
136134 tabindex=${ this . tabIndex }
137- .checked=' ${ this . checked } '
135+ .checked=${ this . checked }
138136 />
137+ < label for =${ this . id } > ${ this . label } </ label >
139138 ` ;
140139 }
141140}
You can’t perform that action at this time.
0 commit comments