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
@@ -6,7 +7,7 @@ from textual.widgets import Label, Input, Button
class EditDiaryModal(ModalScreen[tuple[int,str]]):
BINDINGS = [
("escape", "cancel", "Cancel"),
Binding("escape", "cancel", "Cancel"),
]
def __init__(self, diary_id: int):