Skip to content

Commit

Permalink
Revert "Make on_click parameter optional" because there's still a Pyt…
Browse files Browse the repository at this point in the history
…hon runtime issue when calling a function with too many arguments

This reverts commit 36e9d09.
  • Loading branch information
wwwillchen committed Dec 27, 2023
1 parent 52a1925 commit 63fce42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mesop/components/box/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def box(
*,
style: str = "",
on_click: Callable[[ClickEvent], Any] | Callable[[], Any] | None = None,
on_click: Callable[[ClickEvent], Any] | None = None,
key: str | None = None,
) -> Any:
"""Creates a box component.
Expand Down
2 changes: 1 addition & 1 deletion mesop/components/button/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@validate
def button(
*,
on_click: Callable[[ClickEvent], Any] | Callable[[], Any] | None = None,
on_click: Callable[[ClickEvent], Any] | None = None,
variant: Literal["raised", "flat", "stroked", "icon"] | None = None,
color: str = "",
disable_ripple: bool = False,
Expand Down

0 comments on commit 63fce42

Please sign in to comment.