Skip to content

Commit 0809c11

Browse files
geekalaaadhami3310
andauthored
fix: add missing size property to DynamicIcon class (#5665)
* 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 * fix precommit --------- Co-authored-by: Khaleel Al-Adhami <[email protected]>
1 parent b6c4905 commit 0809c11

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"reflex/components/el/elements/tables.pyi": "e3f299e59bb8ff87aa949c6b606551c9",
4141
"reflex/components/el/elements/typography.pyi": "b4ec4ffb448f7a9b5f94712404448d9e",
4242
"reflex/components/gridjs/datatable.pyi": "98a7e1b3f3b60cafcdfcd8879750ee42",
43-
"reflex/components/lucide/icon.pyi": "c1090e2c68a5d7653584dd74e8b8f1cf",
43+
"reflex/components/lucide/icon.pyi": "b69b861d50bbaecf0e0fde600192ed18",
4444
"reflex/components/markdown/markdown.pyi": "2f84254a548e908020949564fc289339",
4545
"reflex/components/moment/moment.pyi": "93fa4c6009390fe9400197ab52735b84",
4646
"reflex/components/plotly/plotly.pyi": "4311a0aae2abcc9226abb6a273f96372",

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)