Browse Source

Added some more props to components (#953)

Alek Petuskey 2 years ago
parent
commit
1aa8501473
2 changed files with 21 additions and 0 deletions
  1. 3 0
      pynecone/components/forms/select.py
  2. 18 0
      pynecone/components/forms/slider.py

+ 3 - 0
pynecone/components/forms/select.py

@@ -45,6 +45,9 @@ class Select(ChakraComponent):
     # "outline" | "filled" | "flushed" | "unstyled"
     # "outline" | "filled" | "flushed" | "unstyled"
     variant: Var[str]
     variant: Var[str]
 
 
+    # The size of the select.
+    size: Var[str]
+
     @classmethod
     @classmethod
     def get_controlled_triggers(cls) -> Dict[str, Var]:
     def get_controlled_triggers(cls) -> Dict[str, Var]:
         """Get the event triggers that pass the component's value to the handler.
         """Get the event triggers that pass the component's value to the handler.

+ 18 - 0
pynecone/components/forms/slider.py

@@ -46,6 +46,21 @@ class Slider(ChakraComponent):
     # The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
     # The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.
     min_steps_between_thumbs: Var[int]
     min_steps_between_thumbs: Var[int]
 
 
+    # Oreintation of the slider vertical | horizontal.
+    orientation: Var[str]
+
+    # Minimum height of the slider.
+    min_h: Var[str]
+
+    # Minimum width of the slider.
+    min_w: Var[str]
+
+    # Maximum height of the slider.
+    max_h: Var[str]
+
+    # Maximum width of the slider.
+    max_w: Var[str]
+
     @classmethod
     @classmethod
     def get_controlled_triggers(cls) -> Dict[str, Var]:
     def get_controlled_triggers(cls) -> Dict[str, Var]:
         """Get the event triggers that pass the component's value to the handler.
         """Get the event triggers that pass the component's value to the handler.
@@ -99,6 +114,9 @@ class SliderThumb(ChakraComponent):
 
 
     tag = "SliderThumb"
     tag = "SliderThumb"
 
 
+    # The size of the thumb.
+    box_size: Var[str]
+
 
 
 class SliderMark(ChakraComponent):
 class SliderMark(ChakraComponent):
     """The label or mark that shows names for specific slider values."""
     """The label or mark that shows names for specific slider values."""