Skip to content

Commit

Permalink
Clean up UX of property inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Silvester committed Jan 2, 2020
1 parent 2648e13 commit 8fc8b8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/property-inspector/src/index.ts
Expand Up @@ -154,8 +154,12 @@ export class SideBarPropertyInspectorProvider extends PropertyInspectorProvider
if (placeholder) {
this._placeholder = placeholder;
} else {
this._placeholder = new Widget();
this._placeholder.node.textContent = 'No properties to inspect.';
const node = document.createElement('div');
const content = document.createElement('div');
content.textContent = 'No properties to inspect.';
content.className = 'jp-PropertyInspector-placeholderContent';
node.appendChild(content);
this._placeholder = new Widget({ node });
this._placeholder.addClass('jp-PropertyInspector-placeholder');
}
layout.widget = this._placeholder;
Expand Down
12 changes: 10 additions & 2 deletions packages/property-inspector/style/base.css
Expand Up @@ -6,12 +6,20 @@

.jp-PropertyInspector {
display: flex;
align-items: center;
justify-content: center;
color: var(--jp-ui-font-color1);
background: var(--jp-layout-color1);
}

.jp-PropertyInspector-content {
flex-grow: 1;
}

.jp-PropertyInspector-placeholder {
display: flex;
align-items: center;
justify-content: center;
}

.jp-PropertyInspector-placeholderContent {
padding: 8px;
}

0 comments on commit 8fc8b8e

Please sign in to comment.