From cf4ddfb9df2ee5fe62897621d58c88f24ac47166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 6 Jun 2023 20:13:30 +0200 Subject: [PATCH] no rendering if empty and some margin for dashboard navigation --- .../section/section-views/section-views.element.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/section/section-views/section-views.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/section/section-views/section-views.element.ts index 148ed986b9..37fd268bda 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/section/section-views/section-views.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/section/section-views/section-views.element.ts @@ -140,7 +140,7 @@ export class UmbSectionViewsElement extends UmbLitElement { } #renderDashboards() { - return html` + return this._dashboards.length > 0 ? html` ${this._dashboards.map( (dashboard) => html` @@ -153,11 +153,11 @@ export class UmbSectionViewsElement extends UmbLitElement { ` )} - `; + ` : ''; } #renderViews() { - return html` + return this._views.length > 0 ? html` ${this._views.map( (view) => html` @@ -171,7 +171,7 @@ export class UmbSectionViewsElement extends UmbLitElement { ` )} - `; + ` : ''; } 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);