فهرست منبع

add responsive to vstack and hstack (#5298)

Khaleel Al-Adhami 3 روز پیش
والد
کامیت
54f93b0526
2فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 1 1
      pyi_hashes.json
  2. 5 4
      reflex/components/radix/themes/layout/stack.py

+ 1 - 1
pyi_hashes.json

@@ -104,7 +104,7 @@
   "reflex/components/radix/themes/layout/list.pyi": "32ce23a3f851698ac0d609e616bd3605",
   "reflex/components/radix/themes/layout/section.pyi": "2b9b826ab42eae3f8cf4d1899dea4b33",
   "reflex/components/radix/themes/layout/spacer.pyi": "3def4df36e8eecdfba0a7d2f1890b908",
-  "reflex/components/radix/themes/layout/stack.pyi": "72a9b100103bbdee9cfd164be6d336f5",
+  "reflex/components/radix/themes/layout/stack.pyi": "1b09d9123358d430ad6c66343d0e9c92",
   "reflex/components/radix/themes/typography/__init__.pyi": "ef0ba71353dcac1f3546de45f8721bae",
   "reflex/components/radix/themes/typography/blockquote.pyi": "04de9fdb22583d87faaba5619bdc6e3e",
   "reflex/components/radix/themes/typography/code.pyi": "bd58d40878c3488f1ba58a122e78f4e7",

+ 5 - 4
reflex/components/radix/themes/layout/stack.py

@@ -3,6 +3,7 @@
 from __future__ import annotations
 
 from reflex.components.component import Component
+from reflex.components.core.breakpoints import Responsive
 from reflex.vars.base import Var
 
 from ..base import LiteralAlign, LiteralSpacing
@@ -13,10 +14,10 @@ class Stack(Flex):
     """A stack component."""
 
     # The spacing between each stack item.
-    spacing: Var[LiteralSpacing] = Var.create("3")
+    spacing: Var[Responsive[LiteralSpacing]] = Var.create("3")
 
     # The alignment of the stack items.
-    align: Var[LiteralAlign] = Var.create("start")
+    align: Var[Responsive[LiteralAlign]] = Var.create("start")
 
     @classmethod
     def create(
@@ -49,14 +50,14 @@ class VStack(Stack):
     """A vertical stack component."""
 
     # The direction of the stack.
-    direction: Var[LiteralFlexDirection] = Var.create("column")
+    direction: Var[Responsive[LiteralFlexDirection]] = Var.create("column")
 
 
 class HStack(Stack):
     """A horizontal stack component."""
 
     # The direction of the stack.
-    direction: Var[LiteralFlexDirection] = Var.create("row")
+    direction: Var[Responsive[LiteralFlexDirection]] = Var.create("row")
 
 
 stack = Stack.create