Jelajahi Sumber

KNOB: using single-quoted

Diego Queiroz 2 tahun lalu
induk
melakukan
6d8511bed3
1 mengubah file dengan 12 tambahan dan 12 penghapusan
  1. 12 12
      nicegui/elements/knob.py

+ 12 - 12
nicegui/elements/knob.py

@@ -9,13 +9,13 @@ class Knob(Element):
 
     def __init__(
         self,
-        color: str = "primary",
-        center_color: str = "white",
-        track_color: str = "secondary",
-        size: str = "",
+        color: str = 'primary',
+        center_color: str = 'white',
+        track_color: str = 'secondary',
+        size: str = '',
         icon_name: Union[str, None] = None,
-        icon_color: str = "black",
-        icon_size: str = "1rem",
+        icon_color: str = 'black',
+        icon_size: str = '1rem',
     ):
         """Knob
 
@@ -30,15 +30,15 @@ class Knob(Element):
         :param icon_color: color name for the icon in the center of the component, examples: primary, teal-10.
         :param icon_size: size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl), examples: 16px, 2rem.
         """
-        super().__init__("q-knob")
+        super().__init__('q-knob')
 
-        self._props["color"] = color
-        self._props["center-color"] = center_color
-        self._props["track-color"] = track_color
-        self._props["size"] = size
+        self._props['color'] = color
+        self._props['center-color'] = center_color
+        self._props['track-color'] = track_color
+        self._props['size'] = size
 
         if icon_name is not None:
-            self._props["show-value"] = True  # FIXME: make it possible to show numerical values, in addition to icons
+            self._props['show-value'] = True  # FIXME: make it possible to show numerical values, in addition to icons
 
             with self:
                 icon(icon_name)