Skip to content

Commit

Permalink
style: group category label and badge
Browse files Browse the repository at this point in the history
  • Loading branch information
katharinawuensche committed Dec 16, 2024
1 parent c6bed2a commit 8b52345
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions components/geojson-map-toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,20 @@ const { colors, setColor } = useColorsStore();
<CollapsibleTrigger
class="flex w-full items-center justify-between gap-1 p-2 text-left text-sm"
>
<span>{{ titleCase(subcategory.id) }}</span>
<Badge
v-if="
subcategory.columns.length > 0 &&
subcategory.getLeafColumns().filter((c) => c.getIsVisible()).length
"
variant="outline"
>{{ subcategory.getLeafColumns().filter((c) => c.getIsVisible()).length }}</Badge
>
<div>
<span>{{ titleCase(subcategory.id) }}</span>
<Badge
v-if="
subcategory.columns.length > 0 &&
subcategory.getLeafColumns().filter((c) => c.getIsVisible()).length
"
class="ml-2"
variant="outline"
>{{
subcategory.getLeafColumns().filter((c) => c.getIsVisible()).length
}}</Badge
>
</div>

<ChevronDown
class="size-4 shrink-0 grow-0"
Expand Down

0 comments on commit 8b52345

Please sign in to comment.