import { Component } from '@angular/core'; import { NbComponentShape, NbComponentSize, NbComponentStatus, NbThemeService } from '@nebular/theme'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ selector: 'ngx-buttons', styleUrls: ['./buttons.component.scss'], templateUrl: './buttons.component.html', }) export class ButtonsComponent { public constructor(private readonly themeService: NbThemeService) { this.materialTheme$ = this.themeService.onThemeChange() .pipe(map(theme => { const themeName: string = theme?.name || ''; return themeName.startsWith('material'); })); } public readonly materialTheme$: Observable; public readonly statuses: NbComponentStatus[] = [ 'primary', 'success', 'info', 'warning', 'danger' ]; public readonly shapes: NbComponentShape[] = [ 'rectangle', 'semi-round', 'round' ]; public readonly sizes: NbComponentSize[] = [ 'tiny', 'small', 'medium', 'large', 'giant' ]; }