mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Make all popover and drop-down buttons consistent
This commit is contained in:
committed by
Sebastian Martinez
parent
7d977f22da
commit
ac7189a1e9
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user