From 1aa85014736361ac3d5a069c31578b48203d01f9 Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Thu, 11 May 2023 18:55:36 -0700 Subject: [PATCH] Added some more props to components (#953) --- pynecone/components/forms/select.py | 3 +++ pynecone/components/forms/slider.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pynecone/components/forms/select.py b/pynecone/components/forms/select.py index d49c963d8..fca96825c 100644 --- a/pynecone/components/forms/select.py +++ b/pynecone/components/forms/select.py @@ -45,6 +45,9 @@ class Select(ChakraComponent): # "outline" | "filled" | "flushed" | "unstyled" variant: Var[str] + # The size of the select. + size: Var[str] + @classmethod def get_controlled_triggers(cls) -> Dict[str, Var]: """Get the event triggers that pass the component's value to the handler. diff --git a/pynecone/components/forms/slider.py b/pynecone/components/forms/slider.py index 09efcfea5..636cbcfa3 100644 --- a/pynecone/components/forms/slider.py +++ b/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. 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 def get_controlled_triggers(cls) -> Dict[str, Var]: """Get the event triggers that pass the component's value to the handler. @@ -99,6 +114,9 @@ class SliderThumb(ChakraComponent): tag = "SliderThumb" + # The size of the thumb. + box_size: Var[str] + class SliderMark(ChakraComponent): """The label or mark that shows names for specific slider values."""