Skip to content

Commit e3f290b

Browse files
authored
Merge pull request jupyterlab#11368 from meeseeksmachine/auto-backport-of-pr-11331-on-3.2.x
Backport PR jupyterlab#11331 on branch 3.2.x (Updated dialog with text to a reasonable width)
2 parents 798d8bb + 7f35058 commit e3f290b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/apputils/src/dialog.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ export class Dialog<T> extends Widget {
9797
const layout = (this.layout = new PanelLayout());
9898
const content = new Panel();
9999
content.addClass('jp-Dialog-content');
100+
if (typeof options.body === 'string') {
101+
content.addClass('jp-Dialog-content-small');
102+
}
100103
layout.addWidget(content);
101104

102105
this._body = normalized.body;

packages/apputils/style/dialog.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
margin-left: auto;
2727
margin-right: auto;
2828
background: var(--jp-layout-color1);
29-
padding: 24px;
30-
padding-bottom: 12px;
29+
padding: 24px 24px 12px 24px;
3130
min-width: 300px;
3231
min-height: 150px;
3332
max-width: 1000px;
@@ -43,6 +42,10 @@
4342
resize: both;
4443
}
4544

45+
.jp-Dialog-content.jp-Dialog-content-small {
46+
max-width: 500px;
47+
}
48+
4649
.jp-Dialog-button {
4750
overflow: visible;
4851
}

0 commit comments

Comments
 (0)