mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
give more flexibility to the dialog width setting (#14570)
* give more flexibility to the dialog width setting * one more place
This commit is contained in:
@@ -58,7 +58,7 @@ export interface IModalDialogStyles {
|
||||
footerBorderTopColor?: Color;
|
||||
}
|
||||
|
||||
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number;
|
||||
export type DialogWidth = 'narrow' | 'medium' | 'wide' | number | string;
|
||||
export type DialogStyle = 'normal' | 'flyout' | 'callout';
|
||||
export type DialogPosition = 'left' | 'below';
|
||||
|
||||
@@ -223,8 +223,12 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
|
||||
if (typeof this._modalOptions.width === 'number') {
|
||||
this._modalDialog.style.width = `${this._modalOptions.width}px`;
|
||||
} else {
|
||||
} else if (this._modalOptions.width === 'narrow'
|
||||
|| this._modalOptions.width === 'medium'
|
||||
|| this._modalOptions.width === 'wide') {
|
||||
this._modalDialog.classList.add(`${this._modalOptions.width}-dialog`);
|
||||
} else {
|
||||
this._modalDialog.style.width = this._modalOptions.width;
|
||||
}
|
||||
|
||||
if (this._modalOptions.dialogStyle === 'callout') {
|
||||
|
||||
Reference in New Issue
Block a user