Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
<ng-content select="dxc-dialog-header"></ng-content>
</span>
<span *ngIf="isCloseVisible" >
<span *ngIf="isExpandVisible" class="dialog-header expandclass">
<a href="javascript:void(0);" class="closeIcon" [attr.aria-label]="expandButtonLabel"
[matTooltip]="expandButtonLabel" (click)="onExpandHandler($event)" [tabindex]="tabIndexValue" role="button">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path
d="M3.8 3.8l16.4 16.4M20.2 3.8L3.8 20.2M15 3h6v6M9 3H3v6M15 21h6v-6M9 21H3v-6"/>
</svg>
</a>
</span>
<a href="javascript:void(0);" class="closeIcon" [attr.aria-label]="closeButtonLabel"
[matTooltip]="closeButtonLabel" (click)="onCloseHandler($event)" [tabindex]="tabIndexValue" role="button">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
Expand Down
14 changes: 14 additions & 0 deletions projects/dxc-ngx-cdk/src/lib/dxc-dialog/dxc-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class DxcDialogComponent implements OnDestroy, AfterViewInit {
}

@Input() closeButtonLabel: string = 'Close'
expandButtonLabel: string = 'Expand'
@Input()
get overlay(): boolean {
return this._overlay;
Expand All @@ -53,7 +54,15 @@ export class DxcDialogComponent implements OnDestroy, AfterViewInit {
set isCloseVisible(value: boolean) {
this._isCloseVisible = coerceBooleanProperty(value);
}
@Input()
get isExpandVisible(): boolean {
return this._isExpandVisible;
}
set isExpandVisible(value: boolean) {
this._isExpandVisible = coerceBooleanProperty(value);
}
private _isCloseVisible = true;
private _isExpandVisible = false;
@Input() padding: any;
@Input()
get tabIndexValue(): number {
Expand All @@ -73,6 +82,7 @@ export class DxcDialogComponent implements OnDestroy, AfterViewInit {
private _headerHeight = 40;

@Output() onCloseClick = new EventEmitter<any>();
@Output() onExpandClick = new EventEmitter<any>();
@Output() onBackgroundClick = new EventEmitter<any>();

@HostBinding("class") className;
Expand Down Expand Up @@ -108,6 +118,10 @@ export class DxcDialogComponent implements OnDestroy, AfterViewInit {
this.className = `${this.getDynamicStyle(this.defaultInputs.getValue())}`;
}

onExpandHandler($event: any): void{
this.onExpandClick.emit($event);
}

public onCloseHandler($event: any): void {
this.onCloseClick.emit($event);
}
Expand Down