Przeglądaj źródła

KNOB: using Union instead of | to ensure compatibility with Python 3.7

Diego Queiroz 2 lat temu
rodzic
commit
1338d8739c
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      nicegui/elements/knob.py

+ 3 - 3
nicegui/elements/knob.py

@@ -1,9 +1,9 @@
+from typing import Union
+
 from ..dependencies import register_component
 from ..element import Element
 from ..ui import icon
 
-# register_component("knob", __file__, "knob.js")
-
 
 class Knob(Element):
 
@@ -13,7 +13,7 @@ class Knob(Element):
         center_color: str = "white",
         track_color: str = "secondary",
         size: str = "",
-        icon_name: str | None = None,
+        icon_name: Union[str, None] = None,
         icon_color: str = "black",
         icon_size: str = "1rem",
     ):