@engie-group/fluid-design-system-angular
Version:
Fluid Design System Angular
51 lines (42 loc) • 1.37 kB
text/typescript
import {CommonModule} from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
ContentChildren,
EventEmitter,
HostBinding,
Input,
Output,
QueryList,
ViewEncapsulation
} from '@angular/core';
import {IconButtonComponent} from '../icon-button/icon-button.component';
import {SidepanelHeaderActionDirective} from './directives/sidepanel-header-action.directive';
export class SidepanelHeaderComponent {
private staticClass = 'nj-sidepanel-header';
/**
* Title displayed in the header
*/
title?: string;
/**
* Whether it should display a close icon in the header
*/
hasCloseIcon = true;
/**
* Emit event when clicking the close icon
*/
closeIconClicked = new EventEmitter<MouseEvent>();
protected actions: QueryList<SidepanelHeaderActionDirective>;
protected get shouldDisplayHeaderActions() {
return this.hasCloseIcon || this.actions.length;
}
}