mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Add selector tooltips
This commit is contained in:
parent
4444942b46
commit
c7a9471343
3 changed files with 5 additions and 2 deletions
|
@ -32,4 +32,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
items={decks}
|
||||
icon={mdiBookOutline}
|
||||
keyCombination="Control+D"
|
||||
tooltip={tr.qtMiscTargetDeckCtrlandd()}
|
||||
/>
|
||||
|
|
|
@ -18,10 +18,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
items: Item[];
|
||||
icon: IconData;
|
||||
keyCombination: string;
|
||||
tooltip: string;
|
||||
onChange?: (item: Item) => void;
|
||||
}
|
||||
|
||||
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination }: Props = $props();
|
||||
let { title, onChange, icon, items, selectedItem = $bindable(null), keyCombination, tooltip }: Props = $props();
|
||||
let modal: Modal | null = $state(null);
|
||||
let searchQuery = $state("");
|
||||
|
||||
|
@ -52,7 +53,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
});
|
||||
</script>
|
||||
|
||||
<LabelButton on:click={openModal} class="chooser-button">
|
||||
<LabelButton {tooltip} on:click={openModal} class="chooser-button">
|
||||
{selectedItem?.name ?? "…"}
|
||||
</LabelButton>
|
||||
|
||||
|
|
|
@ -31,4 +31,5 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
items={notetypes}
|
||||
icon={mdiNewspaper}
|
||||
keyCombination="Control+N"
|
||||
tooltip={tr.qtMiscChangeNoteTypeCtrlandn()}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue