Add KeyboardButton Component

This commit is contained in:
József Farkas
2016-04-09 21:51:28 +02:00
parent f924a5681f
commit 0ec6b56d9b
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { Component, OnInit, Input } from 'angular2/core';
@Component({
selector: 'keyboard-button',
template:
`
<svg xmlns="http://www.w3.org/2000/svg" [attr.width]="width" [attr.height]="height" [attr.fill]="fill">
<rect [id]="id" [attr.rx]="rx" [attr.ry]="ry" [attr.height]="height" [attr.width]="width"/>
</svg>
`,
styles:
[`
:host {
display: flex;
}
`],
})
export class KeyboardButtonComponent implements OnInit {
@Input() id: string;
@Input() rx: string;
@Input() ry: string;
@Input() height: string;
@Input() width: string;
@Input() fill: string;
constructor() { }
ngOnInit() { }
}

View File

@@ -0,0 +1,10 @@
export interface KeyboardButton {
id: string;
x: string;
y: string;
rx: string;
ry: string;
height: string;
width: string;
fill: string;
}