Refactored bindings to use Binding class for consistency across modal and screen components.

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-07-06 03:04:18 -03:00
parent b1e83aabbb
commit 8a10fddb14
4 changed files with 25 additions and 25 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
from textual.app import ComposeResult
from textual.binding import Binding
from textual.containers import Vertical, Horizontal
from textual.screen import ModalScreen
from textual.widgets import Label, Input, Button
@@ -8,7 +9,7 @@ class RenameEntryModal(ModalScreen[str]):
"""A modal screen to rename a diary entry."""
BINDINGS = [
("escape", "cancel", "Cancel"),
Binding("escape", "cancel", "Cancel"),
]
def __init__(self, current_name: str):