🐛 Fix icon not being shown when asset category had a zero count

This commit is contained in:
Belén Albeza 2024-02-13 15:23:07 +01:00 committed by Andrey Antukh
parent c824711893
commit 1415ed30b6
4 changed files with 25 additions and 17 deletions

View file

@ -13,7 +13,7 @@
(mf/defc title-bar
{::mf/wrap-props false}
[{:keys [collapsable collapsed on-collapsed title children on-btn-click btn-children class all-clickable]}]
[{:keys [collapsable collapsed on-collapsed title children on-btn-click btn-children class all-clickable add-icon-gap]}]
(let [klass (dm/str (stl/css :title-bar) " " class)]
[:div {:class klass}
(if ^boolean collapsable
@ -33,7 +33,7 @@
:on-click on-collapsed}
i/arrow-refactor]
[:div {:class (stl/css :title)} title]])]
[:div {:class (stl/css :title-only)} title])
[:div {:class (stl/css-case :title-only true :title-only-icon-gap add-icon-gap)} title])
children
(when (some? on-btn-click)
[:button {:class (stl/css :title-button)

View file

@ -14,20 +14,6 @@
width: 100%;
min-height: $s-32;
background-color: var(--title-background-color);
.title,
.title-only {
@include tabTitleTipography;
display: flex;
align-items: center;
flex-grow: 1;
height: 100%;
min-height: $s-32;
color: var(--title-foreground-color);
overflow: hidden;
}
.title-only {
margin-left: $s-8;
}
.title-wrapper {
display: flex;
@ -109,3 +95,24 @@
}
}
}
.title,
.title-only {
@include tabTitleTipography;
display: flex;
align-items: center;
flex-grow: 1;
height: 100%;
min-height: $s-32;
color: var(--title-foreground-color);
overflow: hidden;
}
.title-only {
--title-bar-title-margin: #{$s-8};
margin-inline-start: var(--title-bar-title-margin);
}
.title-only-icon-gap {
--title-bar-title-margin: #{$s-12};
}