Make all popover and drop-down buttons consistent

This commit is contained in:
Rūdolfs Ošiņš
2025-05-15 17:08:43 +02:00
committed by Sebastian Martinez
parent 7d977f22da
commit ac7189a1e9
23 changed files with 209 additions and 55 deletions
+8 -2
View File
@@ -18,6 +18,8 @@
}
const { selectedState, onSelect }: Props = $props();
let popoverExpanded: boolean = $state(false);
</script>
<style>
@@ -42,7 +44,11 @@
}
</style>
<Popover popoverPadding="0" popoverPositionTop="2rem" popoverPositionLeft="0">
<Popover
popoverPadding="0"
popoverPositionTop="2rem"
popoverPositionLeft="0"
bind:expanded={popoverExpanded}>
{#snippet toggle(onclick)}
<button disabled={selectedState.status === "merged"} {onclick}>
<span
@@ -57,7 +63,7 @@
: `patch-${selectedState.status}`} />
{capitalize(selectedState.status)}
{#if selectedState.status !== "merged"}
<Icon name="chevron-down" />
<Icon name={popoverExpanded ? "chevron-up" : "chevron-down"} />
{/if}
</span>
</button>