no rendering if empty and some margin for dashboard navigation

This commit is contained in:
Niels Lyngsø
2023-06-06 20:13:30 +02:00
parent 711d0a8df8
commit cf4ddfb9df

View File

@@ -140,7 +140,7 @@ export class UmbSectionViewsElement extends UmbLitElement {
}
#renderDashboards() {
return html`
return this._dashboards.length > 0 ? html`
<uui-tab-group id="dashboards">
${this._dashboards.map(
(dashboard) => html`
@@ -153,11 +153,11 @@ export class UmbSectionViewsElement extends UmbLitElement {
`
)}
</uui-tab-group>
`;
` : '';
}
#renderViews() {
return html`
return this._views.length > 0 ? html`
<uui-tab-group id="views">
${this._views.map(
(view) => html`
@@ -171,7 +171,7 @@ export class UmbSectionViewsElement extends UmbLitElement {
`
)}
</uui-tab-group>
`;
` : '';
}
static styles = [
@@ -194,6 +194,10 @@ export class UmbSectionViewsElement extends UmbLitElement {
box-sizing: border-box;
}
#dashboards {
margin: 0 var(--uui-size-layout-1);
}
#views {
justify-content: flex-end;
--uui-tab-divider: var(--uui-color-divider-standalone);