Number input float (#1817)
This commit is contained in:
parent
796f523c03
commit
63ae96ede3
@ -1,5 +1,6 @@
|
||||
"""A number input component."""
|
||||
|
||||
from numbers import Number
|
||||
from typing import Dict
|
||||
|
||||
from reflex.components.component import Component
|
||||
@ -14,7 +15,7 @@ class NumberInput(ChakraComponent):
|
||||
tag = "NumberInput"
|
||||
|
||||
# State var to bind the input.
|
||||
value: Var[int]
|
||||
value: Var[Number]
|
||||
|
||||
# If true, the input's value will change based on mouse wheel.
|
||||
allow_mouse_wheel: Var[bool]
|
||||
@ -23,7 +24,7 @@ class NumberInput(ChakraComponent):
|
||||
clamped_value_on_blur: Var[bool]
|
||||
|
||||
# The initial value of the counter. Should be less than max and greater than min
|
||||
default_value: Var[int]
|
||||
default_value: Var[Number]
|
||||
|
||||
# The border color when the input is invalid.
|
||||
error_border_color: Var[str]
|
||||
@ -56,10 +57,10 @@ class NumberInput(ChakraComponent):
|
||||
keep_within_range: Var[bool]
|
||||
|
||||
# The maximum value of the counter
|
||||
max_: Var[int]
|
||||
max_: Var[Number]
|
||||
|
||||
# The minimum value of the counter
|
||||
min_: Var[int]
|
||||
min_: Var[Number]
|
||||
|
||||
# "outline" | "filled" | "flushed" | "unstyled"
|
||||
variant: Var[str]
|
||||
|
Loading…
Reference in New Issue
Block a user