Skip to content

Open source personal finance application

refactor: tweak categories Line alignment and amount width

Ilya Komichev40da07697d82
diff --git a/app/components/stat/categories/Line.vue b/app/components/stat/categories/Line.vue
index a2c85206..5c27c2eb 100644
--- a/app/components/stat/categories/Line.vue
+++ b/app/components/stat/categories/Line.vue
@@ -106,11 +106,13 @@ function onAmountClick(e: MouseEvent) {
/>
</template>
- <div class="flex grow items-center gap-1">
+ <div
+ :class="{ '!pb-2': isLines }"
+ class="flex grow items-center gap-1"
+ >
<CategoriesName
:category
:childrenCount="isShowChevron ? undefined : props.item.categories?.length"
- :class="{ '!pb-2': isLines }"
:isShowParent="props.isShowParent"
:parentCategory
:stacked="props.stacked"
@@ -120,15 +122,16 @@ function onAmountClick(e: MouseEvent) {
v-if="isShowChevron && hasChildren"
:name="props.isExpanded ? 'lucide:chevron-down' : 'lucide:chevron-right'"
size="18"
- class="text-muted self-center"
+ class="text-muted"
/>
</div>
<div
v-if="props.item.value !== 0"
:class="{ '!pb-2': isLines }"
- class="-my-1.5 flex min-w-24 shrink-0 cursor-pointer items-center justify-end self-stretch rounded-sm px-2"
+ class="-my-1.5 flex min-w-12 shrink-0 cursor-pointer items-center justify-end self-stretch rounded-sm px-2"
@click="onAmountClick"
+ @pointerdown.stop
>
<Amount
:amount="props.item.value"