We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 367b24d commit 196333fCopy full SHA for 196333f
reflex/style.py
@@ -120,9 +120,11 @@ def convert_item(
120
Raises:
121
ReflexError: If an EventHandler is used as a style value
122
"""
123
- if isinstance(style_item, EventHandler):
+ from reflex.components.component import BaseComponent
124
+
125
+ if isinstance(style_item, (EventHandler, BaseComponent)):
126
msg = (
- "EventHandlers cannot be used as style values. "
127
+ f"{type(style_item)} cannot be used as style values. "
128
"Please use a Var or a literal value."
129
)
130
raise ReflexError(msg)
0 commit comments