File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
projects/components/src/radio Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 88}
99
1010.radio-group {
11+ display : flex ;
12+
13+ & .row {
14+ flex-direction : row ;
15+ }
16+
17+ & .column {
18+ flex-direction : column ;
19+ }
20+
1121 ::ng- deep .radio- button {
1222 line-height : 18px ;
1323 padding-right : 10px ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { RadioOption } from './radio-option';
1111 <ht-label class="title" [label]="this.title"></ht-label>
1212 <mat-radio-group
1313 class="radio-group"
14+ [ngClass]="this.optionsDirection"
1415 [ngModel]="this.selected!.value"
1516 (change)="this.onRadioChange($event)"
1617 [disabled]="this.disabled"
@@ -39,6 +40,9 @@ export class RadioGroupComponent implements OnInit {
3940 @Input ( )
4041 public disabled : boolean | undefined ;
4142
43+ @Input ( )
44+ public optionsDirection : OptionsDirection = OptionsDirection . Column ;
45+
4246 @Output ( )
4347 public readonly selectedChange : EventEmitter < string > = new EventEmitter ( ) ;
4448
@@ -63,3 +67,8 @@ export class RadioGroupComponent implements OnInit {
6367 this . selectedChange . emit ( event . value ) ;
6468 }
6569}
70+
71+ export const enum OptionsDirection {
72+ Row = 'row' ,
73+ Column = 'column'
74+ }
You can’t perform that action at this time.
0 commit comments