1
0
Эх сурвалжийг харах

Change the defalut direction of radio group (#4070). (#4146)

- The default direction of radio groups is column.
- Since most use cases are horizontal, change the default direction from
  column to row.
Manoj Bhat 7 сар өмнө
parent
commit
d6797a1f1d

+ 2 - 2
reflex/components/radix/themes/components/radio_group.py

@@ -84,7 +84,7 @@ class HighLevelRadioGroup(RadixThemesComponent):
     items: Var[List[str]]
     items: Var[List[str]]
 
 
     # The direction of the radio group.
     # The direction of the radio group.
-    direction: Var[LiteralFlexDirection] = LiteralVar.create("column")
+    direction: Var[LiteralFlexDirection] = LiteralVar.create("row")
 
 
     # The gap between the items of the radio group.
     # The gap between the items of the radio group.
     spacing: Var[LiteralSpacing] = LiteralVar.create("2")
     spacing: Var[LiteralSpacing] = LiteralVar.create("2")
@@ -137,7 +137,7 @@ class HighLevelRadioGroup(RadixThemesComponent):
         Raises:
         Raises:
             TypeError: If the type of items is invalid.
             TypeError: If the type of items is invalid.
         """
         """
-        direction = props.pop("direction", "column")
+        direction = props.pop("direction", "row")
         spacing = props.pop("spacing", "2")
         spacing = props.pop("spacing", "2")
         size = props.pop("size", "2")
         size = props.pop("size", "2")
         variant = props.pop("variant", "classic")
         variant = props.pop("variant", "classic")