ソースを参照

Option for additional CSS class on dialogs

Vidar Tonaas Fauske 8 年 前
コミット
976fa63e83
1 ファイル変更8 行追加0 行削除
  1. 8 0
      src/dialog/index.ts

+ 8 - 0
src/dialog/index.ts

@@ -173,6 +173,11 @@ interface IDialogOptions {
    * The confirmation text for the OK button (defaults to 'OK').
    */
   okText?: string;
+
+  /**
+   * An additional CSS class to apply to the dialog.
+   */
+  dialogClass?: string;
 }
 
 
@@ -235,6 +240,9 @@ class Dialog extends Panel {
     let footer = new Widget({node: document.createElement('div')});
     let title = document.createElement('span');
     this.addClass(DIALOG_CLASS);
+    if (options.dialogClass) {
+      this.addClass(options.dialogClass);
+    }
     content.addClass(CONTENT_CLASS);
     header.addClass(HEADER_CLASS);
     body.addClass(BODY_CLASS);