Skip to content
Snippets Groups Projects
button.component.ts 655 B
Newer Older
import { Component } from '@angular/core';
import { CanvasElementComponent } from '../canvas-element-component.directive';

@Component({
  selector: 'app-button',
  template: `
rhenck's avatar
rhenck committed
    <button *ngIf="draggable"
            cdkDrag [cdkDragData]="this"
            mat-button (click)="click($event)"
            [ngStyle]="style">
      {{$any(elementModel).label}}
    </button>
rhenck's avatar
rhenck committed
    <button *ngIf="!draggable"
            mat-button (click)="click($event)"
            [ngStyle]="style">
      {{$any(elementModel).label}}
    </button>
  `,
  styles: [
    'button {position: absolute}'
  ]
})
export class ButtonComponent extends CanvasElementComponent { }