Skip to content

Commit 54f93b0

Browse files
authored
add responsive to vstack and hstack (#5298)
1 parent dc9b352 commit 54f93b0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"reflex/components/radix/themes/layout/list.pyi": "32ce23a3f851698ac0d609e616bd3605",
105105
"reflex/components/radix/themes/layout/section.pyi": "2b9b826ab42eae3f8cf4d1899dea4b33",
106106
"reflex/components/radix/themes/layout/spacer.pyi": "3def4df36e8eecdfba0a7d2f1890b908",
107-
"reflex/components/radix/themes/layout/stack.pyi": "72a9b100103bbdee9cfd164be6d336f5",
107+
"reflex/components/radix/themes/layout/stack.pyi": "1b09d9123358d430ad6c66343d0e9c92",
108108
"reflex/components/radix/themes/typography/__init__.pyi": "ef0ba71353dcac1f3546de45f8721bae",
109109
"reflex/components/radix/themes/typography/blockquote.pyi": "04de9fdb22583d87faaba5619bdc6e3e",
110110
"reflex/components/radix/themes/typography/code.pyi": "bd58d40878c3488f1ba58a122e78f4e7",

reflex/components/radix/themes/layout/stack.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from reflex.components.component import Component
6+
from reflex.components.core.breakpoints import Responsive
67
from reflex.vars.base import Var
78

89
from ..base import LiteralAlign, LiteralSpacing
@@ -13,10 +14,10 @@ class Stack(Flex):
1314
"""A stack component."""
1415

1516
# The spacing between each stack item.
16-
spacing: Var[LiteralSpacing] = Var.create("3")
17+
spacing: Var[Responsive[LiteralSpacing]] = Var.create("3")
1718

1819
# The alignment of the stack items.
19-
align: Var[LiteralAlign] = Var.create("start")
20+
align: Var[Responsive[LiteralAlign]] = Var.create("start")
2021

2122
@classmethod
2223
def create(
@@ -49,14 +50,14 @@ class VStack(Stack):
4950
"""A vertical stack component."""
5051

5152
# The direction of the stack.
52-
direction: Var[LiteralFlexDirection] = Var.create("column")
53+
direction: Var[Responsive[LiteralFlexDirection]] = Var.create("column")
5354

5455

5556
class HStack(Stack):
5657
"""A horizontal stack component."""
5758

5859
# The direction of the stack.
59-
direction: Var[LiteralFlexDirection] = Var.create("row")
60+
direction: Var[Responsive[LiteralFlexDirection]] = Var.create("row")
6061

6162

6263
stack = Stack.create

0 commit comments

Comments
 (0)