Add KeyboardButtonGroup Component

This commit is contained in:
József Farkas
2016-04-09 21:56:47 +02:00
parent 0ec6b56d9b
commit f8bcf2ef94

View File

@@ -0,0 +1,34 @@
import { Component, OnInit, Input } from 'angular2/core';
import {KeyboardButtonComponent} from './keyboard-button.component';
import {KeyboardButton} from './keyboard-button.model';
@Component({
selector: 'keyboard-button-group',
template:
`
<keyboard-button *ngFor="#keyboardButton of keyboardButtons"
[id]="keyboardButton.id" [fill]="keyboardButton.fill"
[rx]="keyboardButton.rx" [ry]="keyboardButton.ry"
[height]="keyboardButton.height" [width]="keyboardButton.width">
</keyboard-button>
`,
styles:
[`
:host {
display: flex;
}
keyboard-button {
border: 2px solid transparent;
}
`],
directives: [KeyboardButtonComponent]
})
export class KeyboardButtonGroupComponent implements OnInit {
@Input() keyboardButtons: KeyboardButton[];
constructor() { }
ngOnInit() { }
}