Skip to content

Commit a055fff

Browse files
committed
fix: add missing size property to DynamicIcon class
Fixes #5660 where rx.icon size attribute was ignored when using dynamic state variables vs static strings. The DynamicIcon class was missing the size: Var[int] property definition, causing size to be treated as CSS style instead of a direct component prop. This resulted in dynamic icons falling back to Lucide React's default size of 24px instead of using the specified size. Changes: - Add size: Var[int] property to DynamicIcon class - Ensures consistent size handling between static and dynamic icons - Both now pass size as proper component props to Lucide React
1 parent a1432bc commit a055fff

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

reflex/components/lucide/icon.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class DynamicIcon(LucideIconComponent):
9393
tag = "DynamicIcon"
9494

9595
name: Var[str]
96+
size: Var[int]
9697

9798
def _get_imports(self):
9899
_imports = super()._get_imports()

0 commit comments

Comments
 (0)