mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-22 05:50:48 +02:00
26 lines
1,001 B
TypeScript
26 lines
1,001 B
TypeScript
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<boolean>;
|
|
|
|
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' ];
|
|
|
|
}
|