document type workspace now uses body-layout

This commit is contained in:
Jesper Møller Jensen
2023-06-08 17:57:44 +12:00
parent b413e59bb7
commit 3d2e685d4f
2 changed files with 10 additions and 14 deletions

View File

@@ -101,16 +101,11 @@ export class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitElement {
static styles = [
UUITextStyles,
css`
:host {
display: block;
margin: var(--uui-size-layout-1);
padding-bottom: var(--uui-size-layout-1); // To enforce some distance to the bottom of the scroll-container.
}
uui-box {
margin-top: var(--uui-size-layout-1);
#add {
width: 100%;
}
#add {
#add:not(:first-child) {
width: 100%;
margin-top: var(--uui-size-layout-1);
}

View File

@@ -184,8 +184,10 @@ export class UmbDocumentTypeWorkspaceViewEditElement
render() {
return html`
<div id="workspace-tab-bar">${this._routerPath ? this.renderTabsNavigation() : ''}${this.renderActions()}</div>
<uui-scroll-container>
<umb-body-layout header-height-fit>
<div id="header" slot="header">
${this._routerPath ? this.renderTabsNavigation() : ''}${this.renderActions()}
</div>
<umb-router-slot
.routes=${this._routes}
@init=${(event: UmbRouterSlotInitEvent) => {
@@ -195,7 +197,7 @@ export class UmbDocumentTypeWorkspaceViewEditElement
this._activePath = event.target.absoluteActiveViewPath || '';
}}>
</umb-router-slot>
</uui-scroll-container>
</umb-body-layout>
`;
}
@@ -211,12 +213,11 @@ export class UmbDocumentTypeWorkspaceViewEditElement
}
/* TODO: This should be replaced with a general workspace bar — naming is hard */
#workspace-tab-bar {
padding: 0 var(--uui-size-layout-1);
#header {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: var(--uui-color-surface);
flex-wrap: nowrap;
}
`,