Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions projects/components/src/radio/radio-group.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
.radio-button {
padding-right: 16px;
@import 'color-palette';
@import 'font';

.title {
@include body-2-medium($gray-7);
display: block;
padding-bottom: 11px;
}

.radio-group {
::ng-deep .radio-button {
line-height: 18px;
padding-right: 10px;
margin-bottom: 10px;

&.mat-radio-checked {
.mat-radio-container {
height: 18px;
width: 18px;

.mat-radio-outer-circle {
background: $blue-4;
height: 18px;
width: 18px;
}

.mat-radio-outer-circle {
border-width: 0px;
}

.mat-radio-inner-circle {
height: 16px;
width: 16px;
top: 1px;
left: 1px;
background: white;
}
}
}

.mat-radio-container {
height: 18px;
width: 18px;

.mat-radio-outer-circle {
border-color: $gray-2;
border-width: 1px;
height: 18px;
width: 18px;
}

.mat-radio-label-content {
padding-left: 9px;
margin-top: 1px;
}
}

.radio-button-label {
@include body-2-regular($gray-7);
}
}

.radio-button:last-child {
margin-bottom: 0px;
}
}
11 changes: 8 additions & 3 deletions projects/components/src/radio/radio-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ import { RadioOption } from './radio-option';
styleUrls: ['./radio-group.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<ht-label [label]="title"></ht-label>
<mat-radio-group [ngModel]="this.selected!.value" (change)="this.onRadioChange($event)" [disabled]="this.disabled">
<ht-label class="title" [label]="this.title"></ht-label>
<mat-radio-group
class="radio-group"
[ngModel]="this.selected!.value"
(change)="this.onRadioChange($event)"
[disabled]="this.disabled"
>
<mat-radio-button *ngFor="let option of options" class="radio-button" [value]="option.value">
<ht-label [label]="option.label"></ht-label>
<ht-label class="radio-button-label" [label]="option.label"></ht-label>
</mat-radio-button>
</mat-radio-group>
`
Expand Down