Skip to content

Commit 945575b

Browse files
committed
remove Component as type for now
1 parent a754923 commit 945575b

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

pyi_hashes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@
115115
"reflex/components/react_player/react_player.pyi": "40db798bcb7fa40207d24f49722135ae",
116116
"reflex/components/react_player/video.pyi": "22d84a7f57be13ece90cb30536d76c7d",
117117
"reflex/components/recharts/__init__.pyi": "a060a4abcd018165bc499173e723cf9e",
118-
"reflex/components/recharts/cartesian.pyi": "d64def4f9372f837583bf1dab30eb35e",
118+
"reflex/components/recharts/cartesian.pyi": "651bfad3d5037cbef8309acc74b5f28e",
119119
"reflex/components/recharts/charts.pyi": "2f0a39f9c02de83d9e2d97763b4411af",
120120
"reflex/components/recharts/general.pyi": "06d0e97776cc82b946fed465ab36fba4",
121-
"reflex/components/recharts/polar.pyi": "71fb8c747e56b4f6bc72bdade16c1385",
122-
"reflex/components/recharts/recharts.pyi": "24a35f769a10a51dbd6d4cbff3b2f071",
121+
"reflex/components/recharts/polar.pyi": "77ca6e0d992f5d5c0479de73db4f71ba",
122+
"reflex/components/recharts/recharts.pyi": "bbaec232c2da035b31b5d0e3888f4801",
123123
"reflex/components/sonner/toast.pyi": "6dc6d5d05d9a8d7d364c0326fb2e6503",
124124
"reflex/components/suneditor/editor.pyi": "0a6dcab61cc2d750488601e3808080d9",
125125
"reflex/experimental/layout.pyi": "fb4c52b954431d9a927fbdd612b562eb"

reflex/components/recharts/cartesian.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from collections.abc import Sequence
66
from typing import Any, ClassVar
77

8-
from reflex.components.component import Component
98
from reflex.constants import EventTriggers
109
from reflex.constants.colors import Color
1110
from reflex.event import EventHandler, no_args_event_spec
@@ -76,7 +75,7 @@ class Axis(Recharts):
7675
reversed: Var[bool]
7776

7877
# The label of axis, which appears next to the axis.
79-
label: Var[str | int | Component | dict[str, Any]]
78+
label: Var[str | int | dict[str, Any]]
8079

8180
# If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
8281
scale: Var[LiteralScale]
@@ -91,7 +90,7 @@ class Axis(Recharts):
9190
ticks: Var[Sequence[str | int]]
9291

9392
# If set false, no ticks will be drawn.
94-
tick: Var[bool | dict | Component]
93+
tick: Var[bool | dict]
9594

9695
# The count of axis ticks. Not used if 'type' is 'category'. Default: 5
9796
tick_count: Var[int]
@@ -278,7 +277,7 @@ class Cartesian(Recharts):
278277
legend_type: Var[LiteralLegendType]
279278

280279
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
281-
label: Var[bool | dict[str, Any] | Component]
280+
label: Var[bool | dict[str, Any]]
282281

283282
# If set false, animation of bar will be disabled. Default: True
284283
is_animation_active: Var[bool]
@@ -657,7 +656,7 @@ class Reference(Recharts):
657656
if_overflow: Var[LiteralIfOverflow]
658657

659658
# If set a string or a number, default label will be drawn, and the option is content.
660-
label: Var[str | int | Component]
659+
label: Var[str | int]
661660

662661
# If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
663662
is_front: Var[bool]
@@ -848,7 +847,7 @@ class CartesianAxis(Grid):
848847
axis_line: Var[bool | dict]
849848

850849
# If set false, no ticks will be drawn.
851-
tick: Var[bool | dict | Component]
850+
tick: Var[bool | dict]
852851

853852
# If set false, no axis tick lines will be drawn. If set a object, the option is the configuration of tick lines. Default: True
854853
tick_line: Var[bool]
@@ -860,7 +859,7 @@ class CartesianAxis(Grid):
860859
interval: Var[LiteralInterval]
861860

862861
# If set a string or a number, default label will be drawn, and the option is content.
863-
label: Var[str | int | Component]
862+
label: Var[str | int]
864863

865864
# If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
866865
mirror: Var[bool]

reflex/components/recharts/polar.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from collections.abc import Sequence
66
from typing import Any, ClassVar
77

8-
from reflex.components.component import Component
98
from reflex.constants import EventTriggers
109
from reflex.constants.colors import Color
1110
from reflex.event import EventHandler, no_args_event_spec
@@ -67,10 +66,10 @@ class Pie(Recharts):
6766
legend_type: Var[LiteralLegendType]
6867

6968
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
70-
label: Var[bool | dict[str, Any] | Component] = Var.create(False)
69+
label: Var[bool | dict[str, Any]] = Var.create(False)
7170

7271
# If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. Default: False
73-
label_line: Var[bool | dict[str, Any] | Component]
72+
label_line: Var[bool | dict[str, Any]]
7473

7574
# Valid children components
7675
_valid_children: ClassVar[list[str]] = ["Cell", "LabelList", "Bare"]
@@ -143,7 +142,7 @@ class Radar(Recharts):
143142
legend_type: Var[LiteralLegendType]
144143

145144
# If false set, labels will not be drawn. Default: True
146-
label: Var[bool | dict[str, Any] | Component]
145+
label: Var[bool | dict[str, Any]]
147146

148147
# If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
149148
is_animation_active: Var[bool]
@@ -192,10 +191,10 @@ class RadialBar(Recharts):
192191
legend_type: Var[LiteralLegendType]
193192

194193
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
195-
label: Var[bool | dict[str, Any] | Component]
194+
label: Var[bool | dict[str, Any]]
196195

197196
# If false set, background sector will not be drawn. Default: False
198-
background: Var[bool | dict[str, Any] | Component]
197+
background: Var[bool | dict[str, Any]]
199198

200199
# If set false, animation of radial bars will be disabled. Default: True
201200
is_animation_active: Var[bool]

reflex/components/recharts/recharts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf):
127127
]
128128
LiteralSyncMethod = Literal["index", "value"]
129129

130-
ACTIVE_DOT_TYPE = bool | dict[str, Any] | Component
130+
ACTIVE_DOT_TYPE = bool | dict[str, Any]

0 commit comments

Comments
 (0)