Move primary buttons on the right of the dialogs (#1382)

Closes #1368.
This commit is contained in:
Francesco Spissu
2022-09-20 11:48:19 +02:00
committed by GitHub
parent 671d2eabd4
commit 364f8b8e51
4 changed files with 19 additions and 5 deletions

View File

@@ -14,7 +14,8 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
constructor(
@inject(WorkspaceInputDialogProps)
protected override readonly props: WorkspaceInputDialogProps,
@inject(LabelProvider) protected override readonly labelProvider: LabelProvider
@inject(LabelProvider)
protected override readonly labelProvider: LabelProvider
) {
super(props, labelProvider);
this.appendCloseButton(
@@ -41,4 +42,14 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
this.errorMessageNode.innerText = DialogError.getMessage(error);
}
}
protected override appendCloseButton(text: string): HTMLButtonElement {
this.closeButton = this.createButton(text);
this.controlPanel.insertBefore(
this.closeButton,
this.controlPanel.lastChild
);
this.closeButton.classList.add('secondary');
return this.closeButton;
}
}