@pepperi/components
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.
37 lines (28 loc) • 1.09 kB
text/typescript
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
import { SessionService, LayoutService } from '@pepperi/lib';
export enum GROUP_BUTTONS_VIEW_TYPE {
Regular,
Dropdown,
Split,
}
({
selector: 'pepperi-group-buttons',
templateUrl: './group-buttons.component.html',
styleUrls: ['./group-buttons.component.scss'],
})
export class GroupButtonsComponent implements OnInit, OnDestroy {
GROUP_BUTTONS_VIEW_TYPE = GROUP_BUTTONS_VIEW_TYPE;
() viewType: GROUP_BUTTONS_VIEW_TYPE = GROUP_BUTTONS_VIEW_TYPE.Regular;
() buttons: any;
() buttonsClass: string;
() buttonsDisabled: string;
() buttonClick: EventEmitter<any> = new EventEmitter<any>();
constructor(public layoutService: LayoutService, public sessionService: SessionService) { }
ngOnInit(): void { }
ngOnDestroy() {
if (this.buttonClick) this.buttonClick.unsubscribe();
}
onButtonClicked(button) {
this.buttonClick.emit(button);
}
}