Design: Dialog-Baustein (Esc, Sperre waehrend Speichern, Fokus, Bottom-Sheet)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-06 06:02:54 +00:00
1 parent 769ec70847
commit 988934552f
5 files changed
+77

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
/**
* Soll diese Taste den Dialog schließen? Nur Esc, nur wenn gerade nichts gespeichert wird (`busy`) und nur, wenn
* niemand die Taste schon behandelt hat (`defaultPrevented`, z. B. schließt eine offene Vorschlagsliste zuerst sich selbst).
*/
export function shouldCloseOnKey({ key, defaultPrevented }, busy) {
return key === 'Escape' && !defaultPrevented && !busy
}