Sync Integ to Master
[sdc.git] / catalog-ui / src / app / ng2 / components / ui / form-components / radio-buttons / radio-buttons.component.ts
1 /**
2  * Created by rc2122 on 9/4/2017.
3  */
4 import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
5 import { RadioButtonModel } from 'app/models'
6 import {UiElementBaseInterface, UiElementBase} from "../ui-element-base.component";
7
8 @Component({
9     selector: 'radio-buttons',
10     templateUrl: './radio-buttons.component.html',
11     styleUrls: ['./radio-button.component.less']
12 })
13 export class RadioButtonComponent  extends UiElementBase implements UiElementBaseInterface {
14     
15     @Input() options:Array<RadioButtonModel>;
16     @Input() readonly:boolean;
17     @Input() direction:string = 'vertical'; //get 'horizontal' | 'vertical'
18     value:any;
19     
20     select(value:any) {
21         this.value = value;
22         this.onChange();
23     }
24 }
25