Added: Flag menu chevron

This commit is contained in:
Luc Mcgrady 2025-11-24 12:31:51 +00:00
parent acf471127f
commit ac990d5840
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 12 additions and 0 deletions

View file

@ -183,6 +183,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<MoreSubmenu bind:showFloating={showFlags}>
<MoreItem
slot="button"
submenu
on:click={() => {
showFlags = !showFlags;
}}

View file

@ -4,11 +4,15 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
export let shortcut: string = "";
export let submenu: boolean = false;
</script>
<div class="row" on:click on:keydown role="button" tabindex="0">
<slot />
<span>{shortcut}</span>
{#if submenu}
<span class="chevron">{"▸"}</span>
{/if}
</div>
<style lang="scss">
@ -30,4 +34,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
min-width: 6em;
}
}
.chevron {
text-align: right;
padding-right: 0.5em;
opacity: 50%;
transform: translateY(-1px);
}
</style>