소스 검색

Add color_scheme prop to pc.switch (#990)

Unknown6334 2 년 전
부모
커밋
6c60295ba1
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      pynecone/components/forms/switch.py

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

@@ -38,6 +38,9 @@ class Switch(ChakraComponent):
     # The placeholder text.
     placeholder: Var[str]
 
+    # The color scheme of the switch (e.g. "blue", "green", "red", etc.)
+    color_scheme: Var[str]
+
     @classmethod
     def get_controlled_triggers(cls) -> Dict[str, Var]:
         """Get the event triggers that pass the component's value to the handler.