Added Commands Management

This commit is contained in:
2025-10-24 23:02:44 +02:00
parent a4e122f4ea
commit 06aff27cad
26 changed files with 88445 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
from fasthtml.components import *
from myfasthtml.core.commands import Command
def mk_button(element, command: Command = None, **kwargs):
if command is None:
return Button(element, **kwargs)
htmx = command.get_htmx_params()
return Button(element, **htmx, **kwargs)