27 lines
901 B
TypeScript
27 lines
901 B
TypeScript
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
import { IconButtonTypes } from '../../buttons';
|
|
|
|
@Component({
|
|
selector: 'iqser-empty-state [text]',
|
|
templateUrl: './empty-state.component.html',
|
|
styleUrls: ['./empty-state.component.scss'],
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
})
|
|
export class EmptyStateComponent implements OnInit {
|
|
readonly iconButtonTypes = IconButtonTypes;
|
|
|
|
@Input() text!: string;
|
|
@Input() icon?: string;
|
|
@Input() showButton = true;
|
|
@Input() buttonIcon = 'iqser:plus';
|
|
@Input() buttonLabel?: string;
|
|
@Input() horizontalPadding = 100;
|
|
@Input() verticalPadding = 120;
|
|
@Input() helpModeKey?: string;
|
|
@Output() readonly action = new EventEmitter();
|
|
|
|
ngOnInit(): void {
|
|
this.showButton = this.showButton && this.action.observers.length > 0;
|
|
}
|
|
}
|