Skip to content

Commit 2c982c5

Browse files
committed
follow up
1 parent 539fe80 commit 2c982c5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • packages/reflex-ui/src/reflex_ui/components/base

packages/reflex-ui/src/reflex_ui/components/base/input.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Custom input component."""
22

3-
from typing import Literal
3+
from typing import ClassVar, Literal
44

55
from reflex_components_core.el.elements.forms import Button
66
from reflex_components_core.el.elements.forms import Input as ReflexInput
@@ -19,7 +19,7 @@
1919
"xs": "px-1.5 h-7 rounded-ui-xs gap-1.5",
2020
"sm": "px-2 h-8 rounded-ui-sm gap-2",
2121
"md": "px-2.5 h-9 rounded-ui-md gap-2",
22-
"lg": "px-3 h-10 rounded-lg gap-2.5",
22+
"lg": "px-3 h-10 rounded-ui-lg gap-2.5",
2323
"xl": "px-3.5 h-12 rounded-ui-xl gap-3",
2424
}
2525

@@ -80,7 +80,7 @@ class HighLevelInput(InputBaseComponent):
8080
icon: Var[str]
8181

8282
# Whether to show the clear button.
83-
show_clear_button: Var[bool]
83+
show_clear_button: ClassVar[bool]
8484

8585
# Events to fire when the clear button is clicked.
8686
clear_events: Var[list[EventHandler]]
@@ -142,11 +142,12 @@ def create(cls, *children, **props) -> BaseUIComponent:
142142
show_clear_button = props.pop("show_clear_button", True)
143143
clear_events = props.pop("clear_events", [])
144144
# Configure input with merged attributes
145+
custom_attrs_override = props.pop("custom_attrs", {})
145146
input_props.update({
146147
"id": id,
147148
"custom_attrs": {
148149
**DEFAULT_INPUT_ATTRS,
149-
**input_props.get("custom_attrs", {}),
150+
**custom_attrs_override,
150151
},
151152
})
152153

0 commit comments

Comments
 (0)