From 95bc48c6896f610a4700b4ac9406fcb2a0563a38 Mon Sep 17 00:00:00 2001 From: Patricio Albizu Date: Wed, 9 Jun 2021 11:34:33 -0300 Subject: [PATCH 1/2] feat: adding options alignment in Radio Group --- .../components/src/radio/radio-group.component.scss | 10 ++++++++++ projects/components/src/radio/radio-group.component.ts | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/projects/components/src/radio/radio-group.component.scss b/projects/components/src/radio/radio-group.component.scss index 7d6554d30..1539e9887 100644 --- a/projects/components/src/radio/radio-group.component.scss +++ b/projects/components/src/radio/radio-group.component.scss @@ -8,6 +8,16 @@ } .radio-group { + display: flex; + + &.row { + flex-direction: row; + } + + &.column { + flex-direction: column; + } + ::ng-deep .radio-button { line-height: 18px; padding-right: 10px; diff --git a/projects/components/src/radio/radio-group.component.ts b/projects/components/src/radio/radio-group.component.ts index 44aa6391f..9b16d1710 100644 --- a/projects/components/src/radio/radio-group.component.ts +++ b/projects/components/src/radio/radio-group.component.ts @@ -11,6 +11,7 @@ import { RadioOption } from './radio-option'; = new EventEmitter(); @@ -63,3 +67,8 @@ export class RadioGroupComponent implements OnInit { this.selectedChange.emit(event.value); } } + +export const enum OptionsDirection { + Row = 'row', + Column = 'column' +} From e0853088e4d311a3f6ebe53465220349a82ca8dc Mon Sep 17 00:00:00 2001 From: Patricio Albizu Date: Wed, 9 Jun 2021 12:47:16 -0300 Subject: [PATCH 2/2] feat: changing radio group default --- projects/components/src/radio/radio-group.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/components/src/radio/radio-group.component.ts b/projects/components/src/radio/radio-group.component.ts index 9b16d1710..1bfcc3fd5 100644 --- a/projects/components/src/radio/radio-group.component.ts +++ b/projects/components/src/radio/radio-group.component.ts @@ -41,7 +41,7 @@ export class RadioGroupComponent implements OnInit { public disabled: boolean | undefined; @Input() - public optionsDirection: OptionsDirection = OptionsDirection.Row; + public optionsDirection: OptionsDirection = OptionsDirection.Column; @Output() public readonly selectedChange: EventEmitter = new EventEmitter();